Payout/Withdrawal API
Initiate Payout/Withdrawal
Initiate a withdrawal request. The following situations will cause the API call to fail. Please pay attention to the error messages returned by the API:
- If the withdrawal amount exceeds the merchant's minimum and maximum withdrawal limits (refer to the merchant backend for withdrawal range limits, and consult customer service for withdrawal fees), the response will be 'Withdrawal amount exceeds limit'.
- If the recipient bank card submitted for payout is incorrect, such as an invalid card number, the API will return 'Invalid card number...'. Please be sure to return this error message to the downstream for display, so that customer service can know the reason for withdrawal failure as soon as possible.
- For Alipay payouts, please fill in the relevant payment account information, set the bank to 'Alipay', leave 'Bank Branch' blank, and fill in the Alipay phone number or email in 'Account Number'.
- Request Method: POST
- Endpoint: http://[API Domain]/api/v1/mch/wdl-orders
- Request Parameters:
| Parameter | Type | Viet. | Thail. | Brazil | India | Ph. | Description |
|---|---|---|---|---|---|---|---|
| mch_id | number | ✅ | ✅ | ✅ | ✅ | ✅ | Merchant ID, view in merchant backend configuration |
| trans_id | string | ✅ | ✅ | ✅ | ✅ | ✅ | Merchant transaction ID, provided by merchant |
| channel | string | ✅ | ✅ | ✅ | ✅ | ✅ | Channel code, use 'mock' for testing. For other countries, see System Channel Codes |
| amount | string | ✅ | ✅ | ✅ | ✅ | ✅ | Order amount, keep two decimal places, use string like "100.00" |
| currency | string | ✅ | ✅ | ✅ | ✅ | ✅ | Currency code, see System Currency Codes |
| account_no | string | ✅ | ✅ | ✅ | ✅ | ✅ | Recipient account or digital wallet account/address, GCASH uses phone number |
| account_name | string | ✅ | ✅ | ✅ | ✅ | ✅ | Recipient account name |
| account_org | string | ✅ | ✅ | ✅ | ✅ | ⭕️ | Recipient bank name (see appendix for Vietnamese banks) |
| account_org_code | string | ✅ | ✅ | ⭕️ | ⭕️ | ⭕️ | Recipient bank code (see appendix for Vietnamese banks, India uses IFSC) |
| account_sub_org | string | ⭕️ | ⭕️ | ⭕️ | ⭕️ | ⭕️ | Bank branch |
| account_type | string | ⭕️ | ⭕️ | ✅ | ⭕️ | ⭕️ | Account type, Brazil uses: CPF, CNPJ, PHONE, EMAIL, EVP |
| account_tin | string | ⭕️ | ⭕️ | ✅ | ⭕️ | ⭕️ | Account tax number, Brazil uses: CPF or CNPJ number |
| account_phone | string | ⭕️ | ⭕️ | ✅ | ⭕️ | ⭕️ | Account phone, required if Brazil's account_type is PHONE |
| account_email | string | ⭕️ | ⭕️ | ✅ | ⭕️ | ⭕️ | Account email, required if Brazil's account_type is EMAIL |
| callback_url | string | ✅ | ✅ | ✅ | ✅ | ✅ | Callback URL, used to notify payout result |
| nonce | string | ✅ | ✅ | ✅ | ✅ | ✅ | Random string, at least 6 characters |
| timestamp | number | ✅ | ✅ | ✅ | ✅ | ✅ | UNIX timestamp, 10 digits |
| sign | string | ✅ | ✅ | ✅ | ✅ | ✅ | signature. See Signature Algorithm |
- Response:
| Parameter | Type | Description |
|---|---|---|
| id | string | Platform unique order ID |
| mch_id | number | Merchant ID |
| trans_id | string | Transaction ID |
| channel | string | Channel code |
| order_amount | number | Order amount |
| currency | string | Currency |
| account_name | string | Recipient name |
| account_no | string | Recipient account |
| account_org | string | Recipient bank name |
| account_org_code | string | Recipient bank code |
| account_sub_org | string | (Optional) Bank branch |
| created_at | string | Order creation time |
| status | number | Order status, 50 means canceled or rejected, 60 means success, 10, 20 means processing |
Response Example:
json
{
"code": 200,
"payload": {
"id": "WT1729187424AJCT",
"trans_id": "2019uZP8KImVd2Xbzae",
"mch_id": "8888",
"channel": "bank",
"order_amount": 100,
"account_no": "2333667799212341",
"account_name": "Nguyễn Xuân Hưng",
"account_org": "PVCOMOBANK",
"account_org_code": "970425",
"account_suborg": "Ho Chi Minh City",
"account_email": "[email protected]",
"account_tel_no": "+969839182913",
"currency": "VND",
"attatch": "withdrawal",
"created_at": "2019-04-12 14:12:31",
"status": 20
}
}After successful payout, the system will send a notification to the platform. See Payout Callback for details.
Payout/Withdrawal Query
Query withdrawal status.
- Request Method: GET
- Endpoint: http://[API Domain]/api/v1/mch/wdl-orders
- Request Example: http://[API Domain]/api/v1/mch/wdl-orders?id=OrderID&mch_id=MerchantID&sign=Signature
- Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | ✅ | Order ID or Transaction ID. Note: this parameter must be included in the signature |
| mch_id | number | ✅ | Merchant ID, view in merchant backend configuration |
| nonce | string | ✅ | Random string, at least 6 characters |
| timestamp | number | ✅ | UNIX timestamp, 10 digits |
| sign | string | ✅ | signature. See Signature Algorithm |
- Response:
| Parameter | Type | Description |
|---|---|---|
| id | string | Platform unique order ID |
| mch_id | number | Merchant ID |
| trans_id | string | Transaction ID |
| order_amount | number | Order amount |
| currency | string | Currency, default is CNY |
| account_name | string | Recipient name |
| account_no | string | Recipient account |
| account_org | string | Recipient bank name |
| account_org_code | string | Recipient bank code |
| account_suborg | string | Bank branch |
| attachments | string[] | proof files |
| created_at | string | Withdrawal time |
| status | number | Order status, 50 means canceled or rejected, 60 means success, others mean processing |
- Response Example
json
{
"code": 200,
"payload": {
"id": "WOu154sgKfZB",
"trans_id": "2019uZP8KImVd2Xbzae",
"mch_id": "8888",
"channel": "bank",
"amount": 100,
"account_no": "2333667799212341",
"account_name": "Nguyễn Xuân Hưng",
"account_org": "PVCOMOBANK",
"account_org_code": "970425",
"account_email": "[email protected]",
"account_tel_no": "+969839182913",
"currency": "VND",
"attachments": [],
"created_at": "2019-04-12 14:12:31",
"status": 10
}
}