createDirectRefund
Use this API to initiate refunds to suppliers through your Antom Business Account.
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
paymentId String REQUIRED
The unique ID that is assigned by Antom to identify a payment.
More information:
- Maximum length: 32 characters
refundRequestId String REQUIRED
The unique ID assigned by a merchant to identify a payment request.
More information:
- Maximum length: 32 characters
referenceRefundId String
The unique ID to identify a refund application submitted by the buyer. It serves as a reference ID to track and manage the refund throughout its lifecycle.
More information:
- Maximum length: 32 characters
refundFromMethod RefundFromMethod REQUIRED
The refund deduction source used during refund process.
refundAmount RefundAmount
The amount refunded from source.
memo String
The transaction description used to display to the initiator.
More information:
- Maximum length: 128 characters
remark String
The transaction description used to display to the deductee.
More information:
- Maximum length: 128 characters
refundReason String
The refund reason.
More information:
- Maximum length: 256 characters
refundNotifyUrl String
The URL you configure to receive payment updates.
More information:
- Maximum length: 128 characters
Response parameters
result Object REQUIRED
Information about the request calling result.
paymentId String
The unique ID assigned by Antom to identify a payment.
More information:
- Maximum length: 32 characters
refundId String
More information:
- Maximum length: 32 characters
refundTime Datetime
refundFromMethod RefundFromMethod
refundFromAmount Amount
refundToAmount Amount
Request
Response
Result/Error codes
| Code | Value | Message | Further action |
|---|---|---|---|
| SUCCESS | S | success. | The refund is successful, no further action is needed. |
| PROCESSING | S | Refund accepted and is under processing | Refund accepted and is under processing. Wait for the asynchronous notification or call the inquiry interface to query the final refund status. |
| PAYMENT_IN_PROCESS | U | payment in process | Check the order status and take corresponding actions. Wait if the transaction is under process. Do not initiate the refund if the transaction failed. Contact Antom Technical Support for specific reasons. |
| REFUND_AMOUNT_EXCEED | F | Refund exceeded the total payment amount. | Please correct the refund amount. |
| REFUND_WINDOW_EXCEED | F | Exceeded refund window | Contact Antom Technical Support. |
| ORDER_NOT_EXIST | F | The order does not exists | Payment order does not exist. Retry with the correct payment information. |
| INVALID_ACCESS_TOKEN | F | Check whether the access token is expired, revoked, or does not exist. | Re-sign the contract and re-initiate the authorization signing process. |
| PARAM_ILLEGAL | F | illegal param received. | Check and verify whether the request fields, including the header fields and body fields, are correct and valid. |
| ACCESS_DENIED | F | Access is denied | Retry with another user information. |
| USER_NOT_EXIST | F | User id does not exist | Retry with the correct user information. |
| PROCESS_FAIL | F | A general business failure occurred, refund failed | Human intervention is usually needed. It is recommended that you contact Antom Technical Support to resolve the issue. |
| UNKNOWN_EXCEPTION | U | Unknown exception has occurred | The service might be down, retry later. If the issue persists, contact Antom Technical Support. |
| REQUEST_TRAFFIC_EXCEED_LIMIT | F | The request traffic exceeds the limit. | Call the interface again to resolve the issue. If the issue persists, contact Antom Technical Support. |
| REPEAT_REQ_INCONSISTENT | F | Repeat request inconsistent. | Please check your request and retry with the correct values. |
| ORDER_IS_CANCEL | F | Refund order is cancelled due to payment order being cancelled. | Contact Antom Technical Support for help. |