inquiryPayment
Use this API to inquire about the transaction status and other information about a previously submitted payment request.
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. paymentRequestId and paymentId cannot both be null. If both paymentRequestId and paymentId are specified, paymentId takes precedence.
More information:
- Maximum length: 64 characters
paymentId String
The unique ID that is assigned by Antom to identify a payment. paymentRequestId and paymentId cannot both be null. A one-to-one correspondence between paymentId and paymentRequestId exists. If both paymentRequestId and paymentId are specified, paymentId takes precedence.
More information:
- Maximum length: 64 characters
merchantAccountId String
The unique ID to identify a merchant account.
Note: Specify this parameter when you use a single client ID across multiple locations.
More information:
- Maximum length: 32 characters
Response parameters
result Result REQUIRED
Information about the request calling result.
Note: This field doesn't indicate the payment result. This field only indicates whether the inquiryPayment API is called successfully.
paymentStatus String
Indicates the payment result. Valid values are:
SUCCESS
: Indicates that the payment succeeds.FAIL
: Indicates that the payment fails.PROCESSING
: Indicates that the payment is under processing.CANCELLED
: Indicates that the payment is canceled.PENDING
: Indicates that the payment is completed. Wait for the final payment result.
Note: This field is returned when the API is called successfully (the value of result.resultStatus is
S
).
paymentResultCode String
The result code for different payment statuses. Possible payment result codes are listed in the Payment result codes table on this page.
Note: This field is returned when the API is called successfully (the value of result.resultStatus is
S
).
More information:
- Maximum length: 64 characters
paymentResultMessage String
The result message that explains the payment result code.
Note: This field is returned when the API is called successfully (the value of result.resultStatus is
S
).
More information:
- Maximum length: 256 characters
paymentRequestId String
The unique ID that is assigned by a merchant to identify a payment request.
Note: This field is returned when the API is called successfully (the value of result.resultStatus is
S
).
More information:
- Maximum length: 64 characters
paymentId String
The unique ID that is assigned by Antom to identify a payment.
Note: This field is returned when the API is called successfully (the value of result.resultStatus is
S
).
More information:
- Maximum length: 64 characters
paymentAmount Amount
The payment amount that the merchant requests to receive in the order currency.
paymentCreateTime Datetime
The date and time when the payment is created.
Note: This field is returned when the API is called successfully (the value of result.resultStatus is S
).
More information:
- The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".
paymentTime Datetime
The date and time when the payment reaches a final state of success.
Note: This field is returned only when the payment reaches a final state of success (the value of paymentStatus is
SUCCESS
).
More information:
- The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".
pspCustomerInfo PspCustomerInfo
The customer information of Alipay+ payment methods.
Note: This field is returned when the Alipay+ payment methods can provide the related information.
redirectActionForm RedirectActionForm
Information about the redirection action.
Note: This field is returned when the value of paymentResultCode is
PAYMENT_IN_PROCESS
.
acquirerReferenceNo String
The unique ID assigned by the non-Antom acquirer for the transaction.
More information:
- Maximum length: 64 characters
transactions Array<Transaction>
Information about the subsequent action against a transaction.
Note: This parameter is returned when a refund or a capture against the transaction exists.
customsDeclarationAmount Amount
The total amount for customs declaration.
Note: This field is returned only when the payment succeeds and the wallet is AlipayCN.
grossSettlementAmount Amount
The value of this field equals to transaction amount multiplied by the value of settlementQuote. This field is returned when the currency exchange is predetermined and the exchange rate is locked at the time of transaction.
settlementQuote Quote
The exchange rate between the settlement currency and transaction currency.
Note: This field is returned when grossSettlementAmount is returned.
paymentResultInfo PaymentResultInfo object
The payment result information.
This parameter is returned when the value of paymentMethodType in the pay (Checkout Payment) API is CARD
, GRABPAY_MY
, or GRABPAY_SG
and the value of paymentStatus is SUCCESS
or FAIL
.
authExpirytime Datetime
The expiration date and time of the authorization payment. You cannot capture the payment after this time.
This parameter is returned when the value of paymentMethodType in the pay (Checkout Payment) API is
CARD
.More information about this field:
- The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".
promotionResult Array <PromotionResult>
Promotion result.
Note: This parameter is returned when the buyer applied a promotion while placing an order.
paymentMethodType String
The payment method type that is included in payment method options. See Payment methods to check the valid values.
Note: This field will be returned when selecting the Antom Chechkout Page integration.
More information:
- Maximum length: 64 characters
Request
Response
More information
This section provides additional information about key parameters. See the following list for details:
- If the pay API call returns successfully, use paymentId or paymentRequestId to inquire about the payment result.
- If the cancel API call returns unknown exceptions or times out, use paymentId or paymentRequestId of the original payment to inquire about the cancel result.
- If the pay API call returns unknown exceptions or timeouts, use paymentRequestId to inquire about the payment result.
Result process logic
For different request results, different actions are to be performed. See the following list for details:
- If the value of result.resultStatus is
S
, the inquiryPayment API is called successfully. You can get the payment result from the paymentStatus field of the API response. - If the value of result.resultStatus is
F
, the inquiryPayment API call failed. You cannot get the payment result from the API response. - If the value of result.resultStatus is
U
, the status of the inquiryPayment API call is unknown. Use the same request parameters to retry the inquiryPayment API.
Result/Error codes
Code | Value | Message | Further action |
---|---|---|---|
SUCCESS | S | Success | The interface is called successfully. Obtain the order status by paymentStatus. |
ACCESS_DENIED | F | Access is denied. | Contact Antom Technical Support for detailed reasons. |
INVALID_API | F | The called API is invalid or not active. | Contact Antom Technical Support to resolve the issue. |
KEY_NOT_FOUND | F | The private key or public key of <span>Antom</span>y or the merchant is not found. | Check whether the private key or public key exists. If not, upload the private key in Antom Developer Center. |
NO_INTERFACE_DEF | F | API is not defined. | Check whether the URL is correct. Please refer to the endpoint in the API documentation. |
ORDER_NOT_EXIST | F | The order does not exist. | Check whether paymentId is correct. If correct, contact Antom Technical Support for specific reasons. |
PARAM_ILLEGAL | F | The required parameters are not passed, or illegal parameters exist. For example, a non-numeric input, an invalid date, or the length and type of the parameter are wrong. | Check and verify whether the required request fields (including the header fields and body fields) of the current API are correctly passed and valid. |
PAYMENT_IN_PROCESS | U | The payment is being processed. | For Cashier Payment, the request you initiated has the same paymentRequestId as that of the existed transaction, which might be a successful or in-process transaction. Check whether redirectActionForm.redirectUrl is returned in the response. If returned, redirect the user to the address specified by redirectUrl to complete the payment. If not, the payment might already be completed. See Result process logic for details. For Auto Debit, the payment is being processed. Wait for the asynchronous notification or call the inquiryPayment interface to query the final payment status. |
PROCESS_FAIL | F | A general business failure occurred. | Do not retry. Human intervention is usually needed. It is recommended that you contact Antom Technical Support to troubleshoot the issue. |
SYSTEM_ERROR | F | A system error occurred. | Do not retry, and contact Antom Technical Support for more details. |
REQUEST_TRAFFIC_EXCEED_LIMIT | U | The request traffic exceeds the limit. | Call the interface again to resolve the issue. If not resolved, contact Antom Technical Support. |
UNKNOWN_EXCEPTION | U | An API call has failed, which is caused by unknown reasons. | Call the interface again to resolve the issue. If not resolved, contact Antom Technical Support. |
Payment result codes
Code | Value | Message | Further action |
---|---|---|---|
SUCCESS | S | Success | The payment is successful, no further action is needed. |
ACCESS_DENIED | F | Access is denied. | Contact Antom Technical Support for detailed reasons. |
CURRENCY_NOT_SUPPORT | F | The currency is not supported. | Contact Antom Technical Support for detailed reasons. |
FRAUD_REJECT | F | The transaction cannot be further processed because of risk control. If the user has already paid for the transaction, the transaction will be refunded. | Contact Antom Technical Support when one of the following conditions is met:
|
INVALID_API | F | The called API is invalid or not active. | Contact Antom Technical Support to resolve the issue. |
INVALID_CARD | F | The card is invalid. Maybe the credit card number cannot be identified, the card has no corresponding issuing bank, or the card number is in the wrong format. | Use a new card to initiate a payment or contact the issuing bank. |
INVALID_EXPIRY_DATE_FORMAT | F | The format of expiryYear or expiryMonth is wrong. | Check the format of the passed parameters expiryYear and expiryMonth. |
ISSUER_REJECTS_TRANSACTION | F | The issuing bank rejects the transaction. | Use a new card to initiate a payment or contact the issuing bank. |
INVALID_ACCESS_TOKEN | F | The access token is expired, revoked, or does not exist. | Check whether the accessToken is expired, revoked, or does not exist. Re-sign the contract and re-initiate the authorization signing process. |
INVALID_MERCHANT_STATUS | F | The merchant status is abnormal because restrictions exist. | Contact Antom Technical Support for detailed reasons. |
KEY_NOT_FOUND | F | The private key or public key of <span>Antom</span> or the merchant is not found. | Check whether the private key or public key exists. If not, upload the private key in Antom Developer Center. |
MERCHANT_KYB_NOT_QUALIFIED | F | The payment failed because of the merchant's KYB status. The merchant is either not KYB compliant, or the KYB status is not qualified for this transaction. | Contact Antom Technical Support for detailed reasons. |
NO_INTERFACE_DEF | F | API is not defined. | Check whether the URL is correct. Please refer to the endpoint in the API documentation. |
NO_PAY_OPTIONS | F | No payment options are available. | Contact Antom Technical Support for detailed reasons. |
ORDER_IS_CLOSED | F | The request you initiated has the same paymentRequestId as that of the existed transaction, which is closed. | Use a new paymentRequestId to initiate the payment again. |
PARAM_ILLEGAL | F | The required parameters are not passed, or illegal parameters exist. For example, a non-numeric input, an invalid date, or the length and type of the parameter are wrong. | Check and verify whether the required request fields (including the header fields and body fields) of the current API are correctly passed and valid. |
PAYMENT_AMOUNT_EXCEED_LIMIT | F | The payment amount is greater than the maximum amount allowed by the contract or payment method. | Check whether the payment amount exceeds the limit or use a lower amount and try again. Contact Antom technical support to know the specific limitation. |
PAYMENT_COUNT_EXCEED_LIMIT | F | The maximum number of payments exceeds the limit that is specified by the payment method. | Contact Antom Technical Support to know the specific limitation. |
PAYMENT_NOT_QUALIFIED | F | The merchant is not qualified to pay because the merchant is not registered, does not have a contract for Auto Debit payment, or is forbidden to make a payment. | Contact Antom Technical Support for detailed reasons. |
PROCESS_FAIL | F | A general business failure occurred. | Do not retry. Human intervention is usually needed. It is recommended that you contact Antom Technical Support to troubleshoot the issue. |
RISK_REJECT | F | The transaction cannot be further processed because of risk control. If the user has already paid for the transaction, the transaction will be refunded. | If the user does not receive the refund within two weeks, contact Antom Technical Support. |
SUSPECTED_CARD | F | The card is suspected of fraud. For example, the card is stolen or restricted. | Use a new card to initiate a payment or contact the issuing bank. |
SUSPECTED_RISK | F | The transaction cannot be further processed because of suspected security issues. You can retry the transaction after one working day. If the transaction is not secure and the user has already paid, the transaction will be refunded. | Contact Antom Technical Support when one of the following conditions is met:
|
SYSTEM_ERROR | F | A system error occurred. | Do not retry, and contact Antom Technical Support for more details. |
USER_AMOUNT_EXCEED_LIMIT | F | The payment amount exceeds the user payment limit. | Create a new payment by using an amount less than or equal to the account's available balance, or contact Antom Technical Support. |
USER_BALANCE_NOT_ENOUGH | F | The payment cannot be completed because the user balance in the corresponding payment method is not enough. | Please top up the account or choose other payment methods. |
USER_KYC_NOT_QUALIFIED | F | The payment failed because of the user's KYC status. The user is either not KYC compliant, or the KYC status is not qualified for this transaction (for example, limitations on the payment amount or product information). | Complete the KYC verification first. |
USER_PAYMENT_VERIFICATION_FAILED | F | The user is restricted from payment on the payment method side. | Contact Antom Technical Support to know the specific reasons. |
USER_STATUS_ABNORMAL | F | The user status is abnormal on the payment method side. | Contact Antom Technical Support to know the specific reasons. |
PAYMENT_IN_PROCESS | U | The payment is being processed. | For Cashier Payment, the request you initiated has the same paymentRequestId as that of the existed transaction, which might be a successful or in-process transaction. Check whether redirectActionForm.redirectUrl is returned in the response. If returned, redirect the user to the address specified by redirectUrl to complete the payment. If not, the payment might already be completed. See Result process logic for details. For Auto Debit, the payment is being processed. Wait for the asynchronous notification or call the inquiryPayment interface to query the final payment status. |
UNKNOWN_EXCEPTION | U | An API call has failed, which is caused by unknown reasons. | For Cashier Payment, call the pay interface again with a new paymentRequestId to resolve the issue. If not resolved, contact Antom Technical Support. For Auto Debit, call the pay interface again or call the inquiryPayment interface to query the final payment status. If the issue is not resolved, contact Antom Technical Support. |
CARD_NOT_SUPPORTED | F | The card used for the transaction is not supported. |
Use another card to pay the transaction. |
INVALID_EXPIRATION_DATE | F | The value of paymentMethod.paymentMethodMetaData.expiryYear or paymentMethod.paymentMethodMetaData.expiryDate is invalid. |
Check whether the value of paymentMethod.paymentMethodMetaData.expiryYear or paymentMethod.paymentMethodMetaData.expiryDate is correct:
|
INVALID_CARD_NUMBER | F | The number of the card used for the transaction is invalid. | Check whether the value of paymentMethod.paymentMethodMetaData.cardNo specified in pay (checkout payment) is correct:
|
DO_NOT_HONOR | F | The payment is declined by the issuing bank. | Retry the payment using a different card or contact the issuing bank. |
Transaction result codes
Code | Value | Message | Further action |
---|---|---|---|
SUCCESS | S | Success | The interface is called successfully. Obtain the refund status from refundStatus. |
ACCESS_DENIED | F | Access is denied. | Contact Antom Technical Support for detailed reasons. |
INVALID_API | F | The called API is invalid or not active. | Contact Antom Technical Support to resolve the issue. |
CLIENT_INVALID | F | The client ID is invalid. <span>Antom</span> has restrictions on client ID. | Check whether the client ID is correct, or contact Antom Technical Support for detailed reasons. |
KEY_NOT_FOUND | F | The private key or public key of <span>Antom</span> or the merchant is not found. | Check whether the private key or public key exists. If not, upload the private key in Antom Developer Center. |
NO_INTERFACE_DEF | F | API is not defined. | Check whether the URL is correct. Please refer to the endpoint in the API documentation. |
ORDER_NOT_EXIST | F | The order does not exist. | Call the interface again after 15 seconds. If no results are returned after three retries, the order has not been placed. |
PARAM_ILLEGAL | F | The required parameters are not passed, or illegal parameters exist. For example, a non-numeric input, an invalid date, or the length and type of the parameter are wrong. | Check and verify whether the required request fields (including the header fields and body fields) of the current API are correctly passed and valid. |
PROCESS_FAIL | F | A general business failure occurred. | Do not retry. Human intervention is usually needed. It is recommended that you contact Antom Technical Support to troubleshoot the issue. |
SYSTEM_ERROR | F | A system error occurred. | Do not retry, and contact Antom Technical Support for more details. |
REQUEST_TRAFFIC_EXCEED_LIMIT | U | The request traffic exceeds the limit. | Call the interface again to resolve the issue. If not resolved, contact Antom Technical Support. |
UNKNOWN_EXCEPTION | U | An API call has failed, which is caused by unknown reasons. | Call the interface again to resolve the issue. If not resolved, contact Antom Technical Support. |
PAYMENT_IN_PROCESS | U | The payment is being processed. | For Cashier Payment, the request you initiated has the same paymentRequestId as that of the existed transaction, which might be a successful or in-process transaction. Check whether redirectActionForm.redirectUrl is returned in the response. If returned, redirect the user to the address specified by redirectUrl to complete the payment. If not, the payment might already be completed. See Result process logic for details. For Auto Debit, the payment is being processed. Wait for the asynchronous notification or call the inquiryPayment interface to query the final payment status. |
AUTHENTICATION_REQUIRED | F | 3D Secure authentication is required. | Reinitiate the payment and redirect the user to perform 3D Secure authentication. |
PAYMENT_PROHIBITED | F | The payment cannot be processed because the goods are prohibited from sale in the country. | You are not allowed to appeal against this transaction. |
INVALID_AMOUNT | F | The transaction was declined by the issuing bank due to various reasons. For example, the specified amount is invalid or exceeds the maximum amount limit. |
Contact Antom Technical Support for detailed reasons. |