createTransfer
Use the createTransfer API to transfer funds between Antom balance accounts.
The transfer process is asynchronous. The response of this API does not indicate the final result of the transfer. Instead, Antom notifies the marketplace of the transfer result through the notifyTransfer 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 field (except array) as String. This means that you must use double quotation marks (" ") to enclose the field value. Examples:
- If the data type of a field is Integer and its value is 20, set it as "20".
- If the data type of a field 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 transfer 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 transfer payer.
transferToDetail TransferToDetail REQUIRED
Details of the transfer beneficiary.
Response parameters
result Result REQUIRED
Indicates whether this API is called successfully.
transferId String
The unique ID assigned by Antom to identify a transfer.
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 transfer request.
This parameter is returned when the value of result.resultStatus is U.
More information:
- Maximum length: 64 characters
transferFromDetail TransferFromDetail
Details of the transfer payer.
This parameter is returned when the value of result.resultStatus is U.
transferToDetail TransferToDetail REQUIRED
Details of the transfer beneficiary.
This parameter is returned when the value of result.resultStatus is U.
API Explorer
Request
URL
Method
POST
{}Response
{
"transferRequestId": "{{transferRequestId}}",
"transferFromDetail": {
"transferFromMethod": {
"paymentMethodType": "BALANCE_ACCOUNT",
"paymentMethodId": "215941182100055000648091331986"
},
"transferFromAmount": {
"currency": "BRL",
"value": "10000"
}
},
"transferToDetail": {
"transferToCurrency": "BRL",
"actualTransferToAmount": {
"currency": "BRL",
"value": "10000"
},
"feeAmount": {
"currency": "USD",
"value": 0
},
"transferToMethod": {
"paymentMethodType": "BALANCE_ACCOUNT",
"paymentMethodId": "215911182100037000652271401986"
},
"transferRemark": "memo shows in worldfirst statement",
"purposeCode": "GDS",
"transferNotifyUrl": "https://www.alipay.com/notify"
}
}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 transfer is under process. For the result of the transfer, wait for the notification from the notifyPayout interface.
Result/Error codes
| Code | Value | Message | Further action |
|---|---|---|---|
| TRANSFER_IN_PROCESS | U | The transfer is in process. | The transfer 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. |
| REPEAT_REQ_INCONSISTENT | F | Repeated requests are inconsistent. | Ensure all the fields in the requests are the same and try again. |
| BALANCE_NOT_ENOUGH | F | Balance is not enough. | Make sure the balance is sufficient and retry. |