Withdrawal Request
API Overview
The Withdrawal Request API is used to create withdrawal orders, supporting multiple withdrawal methods and channels. Merchants can submit withdrawal requests through this API to obtain withdrawal processing results.
API Information
Request URL: /applyfor
Request Method: POST
Content-Type: application/json
Request Parameters
Basic Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| uid | Yes | string | Merchant account |
| currency | Yes | string | Currency |
| bank_id | No | int | Bank ID, parameter values see backend "Channel Bank List" |
| orderid | Yes | string | Order number generated by merchant platform, unique |
| notify_url | Yes | string | Asynchronous notification URL |
| amount | Yes | string | Amount submitted by merchant, accepts two decimal places |
| custom | No | string | Remarks |
| user_name | No | string | Real name (required for some channels) |
| userip | Yes | string | IP address of merchant member |
| timestamp | Yes | string | Unix timestamp, 10 digits |
| bank_account | No | string | Account holder name |
| bank_no | No | string | Bank account number |
| bank_name | No | string | Bank name |
| bank_province | No | string | Province where the bank is located |
| bank_city | No | string | City where the bank is located |
| bank_sub | No | string | Bank branch |
| bank_ifsc | No | string | IFSC (required for India) IFSC code contains 11 alphanumeric characters, first four characters are letters, last six characters are numbers or letters and numbers |
| sign | Yes | string | Data signature |
| pay_code | Yes | string | Channel code, parameter values see "Channel Codes" at the end |
Dynamic Field Parameters
Different withdrawal channels (pay_code) may require different mandatory fields. To ensure you submit the correct parameters, please call the /channel/formRule API to get the field requirements for that channel before creating a withdrawal order.
Get Field Rules Example:
{
"uid": "test1",
"currency": "VND",
"pay_code": "1004",
"timestamp": 1758210270,
"userip": "127.0.0.1",
"sign": "200AF28BB3E4C4F0E93EBD48DB1FF623"
}Field Rules Response Example:
{
"status": 10000,
"result": {
"data": {
"pay_code": "1004",
"name": "Korea Withdrawal",
"description": "Withdrawal through Korea payment",
"form_fields": [
{
"name": "bank_id",
"label": "Bank ID",
"type": "select",
"required": true,
"max_length": 100,
"placeholder": "Please select Bank ID",
"options": [
{
"bankID": 1001,
"name": "KB Kookmin Bank"
}
],
"validation_rules": ["required", "integer"]
},
{
"name": "bank_account",
"label": "Account Holder Name",
"type": "input",
"required": true,
"max_length": 50,
"placeholder": "Please enter account holder name",
"options": null,
"validation_rules": ["required", "string", "max:50"]
}
]
}
}
}Integration Recommendations:
- After the user selects a withdrawal channel, call
/channel/formRuleto get the field requirements for that channel - Dynamically generate the withdrawal form based on the returned
form_fields - Ensure all required fields (
required: true) are included when submitting the withdrawal request - For fields with
type: "select", use the values fromoptionsas choices
Response Parameters
Basic Response Structure
| Parameter | Field | Type | Description |
|---|---|---|---|
| Status Code | status | int | More error codes see status code table |
| Response Data | result | object | Returns JSON string when status code is "Success" |
| Data Signature | sign | string | 32-bit uppercase MD5 signature value |
result Object Description
| Parameter | Field | Type | Description |
|---|---|---|---|
| Transaction ID | transactionid | int | Transaction ID generated by payment platform, unique |
Response Examples
Success Response Example
{
"status": 10000,
"result": {
"transactionid": "123"
},
"sign": "xxx"
}Error Handling
When a request fails, the system will return the corresponding error status code. Common error codes include:
10000: Success10001: Parameter Error10002: Signature Verification Failed10003: Duplicate Order Number10004: Amount Format Error10005: Bank ID Does Not Exist10006: Insufficient Balance10007: Withdrawal Limit Exceeded
Signature Algorithm
Signature generation rules:
- Sort all request parameters by parameter name ASCII code from small to large
- Concatenate into string using URL key-value pair format
- Add merchant secret key at the end of the string
- Perform MD5 encryption on the concatenated string
- Convert the encryption result to uppercase
Integration Notes
- Security: Always use HTTPS for API requests
- Timestamp: Ensure server time synchronization to avoid timestamp validation failures
- Order ID: Merchant order IDs must be unique to avoid duplicate submissions
- Amount: Pay attention to decimal places based on different channels
- Signature: Verify response signatures to ensure data integrity
- Balance Check: Ensure sufficient account balance before withdrawal
- Limit Management: Pay attention to single and daily withdrawal limits
Withdrawal Process
- Get Field Rules: Call
/channel/formRuleto get field requirements for withdrawal channel - Generate Withdrawal Form: Dynamically generate withdrawal form based on field rules
- Submit Withdrawal Request: Call
/applyforAPI to submit withdrawal order - Handle Response: Process the response accordingly
- Asynchronous Notification: Receive asynchronous notifications for withdrawal status changes
Support
For technical support and questions, please contact our development team or refer to the complete API documentation.
Updated 4 months ago