notifyDirectRefund
Antom sends notifications of the direct refund result with this interface. The merchant can set up the URL for receiving direct refund notifications by specifying the notifyUrl field when calling createDirectRefund or setting the url in Antom Dashboard.
Request parameters
notifyType String REQUIRED
The type of the refund status notification. The valid value is:
REFUND_RESULT: Indicates that the notification is about the refund result.
More information:
- Maximum length: 32 characters
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
refundRequestId String
The unique ID assigned by a merchant to identify a payment request.
More information:
- Maximum length: 32 characters
refundStatus String REQUIRED
Refund Status. Possible values are:
SUCCESS: Refund successful.FAIL: Refund failed.
refundResultCode String
Result code. Refer to the Refund result codes table for possible values.
Note: This parameter will only be returned when the value of refundStatus is FAIL.
refundResultMessage String
Refund result message that explains the refund result code.
Note: This parameter will only be returned when the value of refundStatus is FAIL.
More information:
- Maximum length: 256 characters
refundTime Datetime
The time when refund is completed.
More information:
- The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".
refundFromMethod RefundFromMethod
refundFromAmount Amount
refundToAmount Amount
Response parameters
result Result REQUIRED
The result of the API call.
Request
Response
Refund result codes
| Code | Value | Message | Further action |
|---|---|---|---|
| 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 | Refund exceeded the acceptable refund period. |
| 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. |