inquireDirectPayment
Use this API to query the direct payment result.
- You need to set up a timeout mechanism to stop the polling process, in case no conclusive result is reached.
- If you do not receive any notification from Antom two hours after you call the createDirectPayment API; and meanwhile, if you call this API and get
UNKNOWN in the paymentStatus, contact our Technical Support Team for help.
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
The unique ID that is assigned by a merchant to identify a payment request.
Note: paymentRequestId and paymentId cannot both be null.
More information:
- This field is an API idempotency field.
- Maximum length: 64 characters
paymentId String
The unique ID that is assigned by Antom to identify a payment.
Note: paymentRequestId and paymentId cannot both be null.
More information:
- Maximum length: 64 characters
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: 64 characters
paymentRequestId String
The unique ID assigned by a merchant to identify a payment request.
More information:
- Maximum length: 64 characters
paymentStatus String
Payment Status. Valid values are:
SUCCESS: The payment is successful.PROCESSING: The payment is successful accepted and currently under processing.FAIL: The payment is failed.UNKNOWN: The payment result is unknown, please contact Antom for support.
More information:
- Maximum length: 32 characters
paymentResultMessage String
Payment result message that explains the payment result code.
Note: This parameter will only be returned when the value of paymentStatus is FAIL.
More information:
- Maximum length: 256 characters
paymentResultCode String
Payment result code .The Payment result code that might be returned are listed in the Payment result codes table on this page.
Note: This parameter will only be returned when the value of paymentStatus is FAIL.
More information:
- Maximum length: 64 characters
payToMethod PayToMethod
Payment method details.
paymentAmount Amount
The payment amount that the merchant requests to receive in the order currency.
payToAmount Amount
The payment amount that the receiver received in.
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. | Inquire request is successful, no further action is needed. |
| PARAM_ILLEGAL | F | illegal param received. | Check and verify whether the request fields, including the header fields and body fields, are correct and valid. For details on the fields of each API, see the specific API Structure section. |
| 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. |
| PROCESS_FAIL | F | A general business failure occurred, payment 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. |
| ORDER_NOT_EXIST | F | The order does not exist | Check whether paymentId is correct. |
Payment result codes
| Code | Value | Message | Further action |
|---|---|---|---|
| ACCESS_DENIED | F | Access denied. | Contact Antom Technical Support for detailed reasons. |
| 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. |
| 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 | F | 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 | AMOUNT_EXCEED_LIMIT | Please check your payment amount and try again. |
| ORDER_NOT_EXIST | F | order not exist | Please check your order id and retry with the correct values. |