Complete API Documentation for Third-Party Integration
The Appfinity Pay Later SDK enables third-party platforms to seamlessly integrate our Pay Later solution into their applications. Our SDK provides a complete credit system with instant approvals, flexible repayment options, and comprehensive fraud protection.
All API requests require authentication using Platform API Keys. Contact our team to get your production API keys.
Environment | Key Format | Usage |
---|---|---|
Sandbox | pk_test_... |
Development and testing |
Production | pk_live_... |
Live transactions |
Complete guide to integrating Appfinity Pay Later SDK into your application:
Add our JavaScript SDK to your website. The SDK handles all Pay Later interactions, UI components, and API communications:
Initialize the SDK with your platform credentials:
Note: The deductAmount
parameter is optional and is used when you want to immediately purchase coins from the Appfinity wallet. When provided, the system will attempt to deduct the specified amount from the user's wallet during Step 1 of the flow. The response of this deduction operation will be received in the callbackFunction
, allowing you to handle success or failure scenarios accordingly.
The callbackFunction(res)
will receive a response object with the following structure:
Add the Pay Later button to your checkout page:
The startFlow function can contain additional user parameters for better user experience:
Use these wallet API endpoints to manage user balances and transactions:
Retrieve wallet transaction history for user account management:
Complete reference for all Pay Later API endpoints:
Endpoint: /v1/wallet
Retrieve the current wallet balance for a user.
Parameter | Type | Required | Description |
---|---|---|---|
string | Required | User's email address |
Endpoint: /v1/paylater/apply
Submit a Pay Later credit application.
Parameter | Type | Required | Description |
---|---|---|---|
string | Required | User's email address | |
amount | number | Required | Credit amount requested |
currency | string | Optional | Currency code (default: USD) |
country | string | Optional | Country code (auto-detected) |
Endpoint: /v1/paylater/status
Check the status of a Pay Later application.
Parameter | Type | Required | Description |
---|---|---|---|
string | Required | User's email address | |
application_id | string | Optional | Specific application ID |
Endpoint: /v1/paylater/activate
Activate an approved Pay Later account.
Parameter | Type | Required | Description |
---|---|---|---|
string | Required | User's email address | |
application_id | string | Required | Approved application ID |
Endpoint: /v1/paylater/transactions
Retrieve transaction history for a user.
Parameter | Type | Required | Description |
---|---|---|---|
string | Required | User's email address | |
limit | number | Optional | Number of transactions to return (default: 10, max: 100) |
offset | number | Optional | Number of transactions to skip (default: 0) |
Endpoint: /v1/due-balance/pay-auto
Automatically processes payment for outstanding due balance using saved payment methods or wallet funds.
Parameter | Type | Required | Description |
---|---|---|---|
string | Required | User's email address | |
amount | number | Required | Amount to pay from due balance |
payment_method | string | Optional | Payment method preference (auto, wallet, card). Default: auto |
Need Help? Our technical team is here to assist with your integration:
Contact our team to obtain your production API credentials.
Run the complete test suite and verify all integration points.
Set up webhook endpoints for real-time transaction updates.
Implement logging and monitoring for production usage.