createDirectPayment
Use this API to initiate a payment. Once initiated, the response will contain the transaction status and processing instructions from ABA.
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
paymentRequestId String REQUIRED
The unique ID assigned by a merchant to identify a payment request.
More information:
- This field is an API idempotency field.
- Maximum length: 32 characters
memo String
Description for a sender.
More information:
- Maximum length: 128 characters
remark String
Description for a receiver.
More information:
- Maximum length: 128 characters
order Order
The order information.
paymentNotifyUrl String
The URL that is used to receive the payment status notification.
More information:
- Maximum length: 256 characters
payToMethod PayToMethod REQUIRED
payToAmount Amount REQUIRED
payFromAmount Amount REQUIRED
Response parameters
result Result REQUIRED
Indicates whether this API is called successfully.
paymentId String
The unique ID that is assigned by Antom to identify a payment.
More information:
- Maximum length: 32 characters
paymentRequestId String
The unique ID assigned by a merchant to identify a payment request.
More information:
- Maximum length: 128 characters
payToMethod PayToMethod
Payment method details.
paymentAmount Amount
The payment amount that the merchant requests to receive in the order currency.
payToAmount Amount
Pay-to amount details.
paymentTime Datetime
The time when the payment is completed.
More information:
- The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".
Request
Response
Result/Error codes
| Code | Value | Message | Further action |
|---|---|---|---|
| SUCCESS | S | success. | The payment is successful, no further action is needed. |
| PROCESSING | S | Processing | Payment is accepted. You may inquire for the results later. |
| UNKNOWN_EXCEPTION | U | API failed due to unknown reason. | The service might be down, retry later. If the issue persists, contact Antom Technical Support. |
| ACCESS_DENIED | F | Access denied. | Contact Antom Technical Support for detailed reasons. |
| USER_BALANCE_NOT_ENOUGH | F | Balance not enough. | Insufficient balance amount, please top up your balance before retrying. |
| USER_NOT_EXIST | F | The user nor exist. | User not found, try again with a valid user id. If the issue persists, contact Antom Technical Support. |
| CURRENCY_NOT_SUPPORT | F | The currency is not supported. | This currency is not supported, please try with a valid currency. |
| PROCESS_FAIL | F | A general business failure occurred. Don't retry. | Human intervention is usually needed. It is recommended that you contact Antom Technical Support to resolve the issue. |
| REQUEST_TRAFFIC_EXCEED_LIMIT | U | Request traffic exceed limit. | Call the interface again to resolve the issue. If the issue persists, contact Antom Technical Support. |
| PARAM_ILLEGAL | F | Illegal parameters. For example, non-numeric input, invalid date. | Check your parameters and invoke again. |
| USER_ACCOUNT_ABNORMAL | F | The user's account is abnormal. | Contact Antom Technical Support for detailed reasons. |
| USER_STATUS_ABNORMAL | F | The user status is abnormal. | Contact Antom Technical Support for detailed reasons. |
| RISK_REJECT | F | The transaction cannot be further processed because of security reasons. If the user has already paid for the transaction, the transaction will be refunded. | Risk rejection. Contact Antom Technical Support for detailed reasons. |
| AMOUNT_EXCEED_LIMIT | F | The payment amount is greater than the maximum amount allowed by the contract or payment method. | Please check your payment amount and try again. |
| REPEAT_REQ_INCONSISTENT | F | The amount or currency is different from the previous request. | Please check your request and retry with the correct values. |