createPayout
Use the createPayout API to withdraw funds from the An to mntom balance account to bank accounts external to Antom.
The payout process is asynchronous. The response of this API does not indicate the final result of the payout. Instead, Antom notifies the marketplace of the payout result through the notifyPayout interface asynchronously.
Structure
A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:
Note: Set the data type of each parameter (except array) as String. This means that you must use double quotation marks (" ") to enclose the parameter value. Examples:
- If the data type of a parameter is Integer and its value is 20, set it as "20".
- If the data type of a parameter is Boolean and its value is true, set it as "true".
Request parameters
transferRequestId String REQUIRED
The unique ID assigned by the marketplace to identify a payout request.
More information:
- This field is an API idempotency field.For requests that are initiated with the same value of transferRequestId and reach a final status (S or F), the same result is to be returned for the request.
- Maximum length: 64 characters
transferFromDetail TransferFromDetail REQUIRED
Details of the payout payer.
transferToDetail TransferToDetail REQUIRED
Details of the payout beneficiary.
Response parameters
result Result REQUIRED
Indicates whether this API is called successfully.
transferId String
The unique ID assigned by Antom to identify a payout.
This parameter is returned when the value of result.resultStatus is U.
More information:
- Maximum length: 64 characters
transferRequestId String
The unique ID assigned by the marketplace to identify a payout request.
This parameter is returned when the value of result.resultStatus is U.
More information:
- Maximum length: 64 characters
transferFromDetail TransferFromDetail
Details of the payout payer.
This parameter is returned when the value of result.resultStatus is U.
transferToDetail TransferToDetail
Details of the payout beneficiary.
This parameter is returned when the value of result.resultStatus is U.
API Explorer
Request
URL
Method
POST
{
"transferRequestId": "{{transferRequestId}}",
"transferFromDetail": {
"transferFromMethod": {
"paymentMethodId": "215911182100037000652271401986",
"paymentMethodType": "BALANCE_ACCOUNT"
},
"transferFromAmount": {
"currency": "BRL",
"value": 101
}
},
"transferToDetail": {
"transferToMethod": {
"paymentMethodType": "SETTLEMENT_CARD"
},
"purposeCode": "GDS",
"transferToCurrency": "BRL",
"transferRemark": "memo shows in worldfirst statement",
"transferNotifyUrl": "https://www.alipay.com/notify"
}
}Response
{
"transferFromDetail": {
"transferFromAmount": {
"currency": "BRL",
"value": "101"
},
"transferFromMethod": {
"paymentMethodId": "215911182100037000652271401986",
"paymentMethodType": "BALANCE_ACCOUNT"
}
},
"transferId": "202310091119100000070000069719",
"transferRequestId": "transferRequestId_1696822076643",
"transferToDetail": {
"feeAmount": {
"currency": "BRL",
"value": "1"
},
"actualTransferToAmount": {
"currency": "BRL",
"value": "100"
},
"purposeCode": "GDS",
"transferNotifyUrl": "https://www.alipay.com/notify",
"transferRemark": "memo shows in worldfirst statement",
"transferToCurrency": "BRL",
"transferToMethod": {
"paymentMethodType": "SETTLEMENT_CARD"
}
},
"result": {
"resultCode": "PROCESSING",
"resultMessage": "Processing",
"resultStatus": "S"
}
}Result process logic
After making an API request, Antom responds to you with the result of the API call. The possible responses for result.resultStatus are:
- F: indicates the API call failed. For more information on why the call failed, see result.resultCode.
- U: indicates the payout is under process. For the result of the payout, wait for the notification from the notifyPayout interface.
Result/Error codes
| Code | Value | Message | Further action |
|---|---|---|---|
| BALANCE_NOT_ENOUGH | F | Balance is not enough. | Make sure the balance is sufficient and retry. |
| CARD_NOT_BIND | F | Settlement card is unbound. | Settlement card is unbound. Please bind a settlement card and try again. |
| REPEAT_REQ_INCONSISTENT | F | Repeated requests are inconsistent. | Ensure all the fields in the requests are the same and try again. |
| TRANSFER_IN_PROCESS | U | The transfer is in process. | The payout was created successfully and is being processed. |
| UN_SUPPORT_BUSINESS | F | Unsupported business. | Invalid parameters are used. Retry with the correct information. |
| USER_NO_PERMISSION | F | User does not have permission. | Retry with another user's information. |
| USER_NOT_EXIST | F | The user does not exist. | Retry with the correct user information. |