notifyPayment
APO uses this API to send the payment result to the merchant when the payment processing reaches a final state of success or failure. Merchants promote merchant-side transactions based on the payment result.
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
notifyType String REQUIRED
Type of the payment status notification. Valid values are:
PAYMENT_RESULT: Indicates that the notification is about the payment result.PAYMENT_PENDING: Indicates that the user has completed the payment. The merchant needs to wait for the final payment result.
result Result REQUIRED
Details about the payment result, such as payment status, result code, and result message.
paymentRequestId String REQUIRED
The unique ID that is assigned by a merchant to identify a payment request.
More information:
- Maximum length: 64 characters
paymentId String REQUIRED
The unique ID that is assigned by APO to identify a payment. A one-to-one correspondence between paymentId and paymentRequestId exists.
More information:
- Maximum length: 64 characters
paymentAmount Amount REQUIRED
The payment amount that the merchant requests to receive in the order currency.
paymentCreateTime Datetime REQUIRED
The date and time when the payment is created.
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 result.resultStatus is
S).
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 digital wallets.
Note: This field is returned when the digital wallet can provide the related information.
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.
Note: 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.
acquirerReferenceNo String
The unique ID assigned by the non-Antom acquirer for the transaction.
More information:
- Maximum length: 64 characters
paymentResultInfo PaymentResultInfo object
The payment result information.
Note: This parameter is returned when the value of paymentMethodType in the pay API is
CARD.
Card
cardNo String
The masked card number, which just shows part of the card number and can be used to display to the user.
Note: This parameter is returned when the value of paymentMethodType in the pay API is
CARDand the merchant does not have the PCI qualification.
More information:
- Maximum length: 32 characters
cardBrand String
The card brand, which can be used to display to the user.
Note: This parameter is returned when the value of paymentMethodType in the pay API is
CARD.
More information:
- Maximum length: 256 characters
cardToken String
The token of the card, the value of this parameter is used by paymentMethodId in the pay API in subsequent payments.
Note: This parameter is returned when the value of paymentMethodType in the pay API is
CARDand the merchant does not have the PCI qualification.
More information:
- Maximum length: 128 characters
issuingCountry String
The issuing country of the card. The value of this parameter is a 2-letter country code that follows ISO 3166 Country Codes standard.
Note: This parameter is returned when the value of paymentMethodType in the pay API is
CARD.
More information:
- Maximum length: 2 characters
funding String
The funding type of the card. Valid values are:
CREDIT: indicates a credit cardDEBIT: indicates a debit cardPREPAID: indicates a prepaid cardCHARGE: indicates a charge cardDEFERRED_DEBIT: indicates a deferred debit card
Note:
This parameter is returned when all the following conditions are met:
- The value of paymentMethodType is
CARD.- The value of cardNo is valid.
- The information is available in the Alipay card database.
More information:
- Maximum length: 32 characters
paymentMethodRegion String
The region code that represents the country or region of the payment method. The value of this parameter is a 2-letter ISO country code or GLOBAL.
Note: This parameter is returned when the value of paymentMethodType in the pay API is
CARD.
More information:
- Maximum length: 6 characters
threeDSResult ThreeDSResult
The result of 3D Secure authentication.
Note: This parameter is returned when the value of paymentMethodType in the pay API is
CARDand the card authentication type is 3D Secure.
avsResultRaw String
The raw AVS result. See AVS result codes to check the valid values.
Note: This parameter is returned when the issuing bank passes this information to APO.
More information:
- Maximum length: 128 characters
cvvResultRaw String
The raw Card Verification Value (CVV), Card Security Code (CSC), or Card Verification Code (CVC) result. See CVV result codes to check the valid values.
Note: This parameter is returned when the issuing bank passes this information to APO.
More information:
- Maximum length: 128 characters
networkTransactionId String
The unique ID assigned by the card scheme to identify a transaction. The value of this parameter is used by the same parameter of pay request in subsequent payments.
Note: This parameter is returned when the value of paymentMethodType in the pay API is
CARDand 3D Secure or non-3D Secure authentication is successful.
More information:
- Maximum length: 128 characters
cardCategory String
The payment card category. Valid vaules are:
CONSUMER: the personal cardCOMMERCIAL: the business card
Note:
This parameter is returned when all the following conditions are met:
- The value of paymentMethodType is
CARD.- The value of cardNo is valid.
- The information is available in the APO card database.
More information:
- Maximum length: 32 characters
creditPayPlan CreditPayPlan
The installment plan information for an installment payment.
Note: This parameter is returned when the buyer successfully made a payment in installments using a card.
lastFour String
Last 4 digits of the card number.
Note: This parameter is returned when the value of paymentMethodType in the pay API is
CARD.
More information:
- Maximum length: 4 characters
expiryMonth String
The month the card expires. Pass in two digits representing the month. For example, if the expiry month is February, the value of this parameter is 02.
Note: This parameter is returned when the value of paymentMethodType in the pay API is
CARD.
More information:
- Maximum length: 2 characters
expiryYear String
The year the card expires. Pass in the last two digits of the year number. For example, if the expiry year is 2025, the value of this parameter is 25.
Note: This parameter is returned when the value of paymentMethodType in the pay API is
CARD.
More information:
- Maximum length: 2 characters
fingerprint String
Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number.
More information:
- Maximum length: 256 characters
authenticationFlow String
For authenticated transactions: how the customer was authenticated by theissuing bank. Valid values are:
-
CHALLENGE: the issuing bank authenticated the customer by presenting a traditional challenge window. -
FRICTIONLESS: the issuing bank authenticated the customer via the 3ds2 frictionless flow.
More information:
- Maximum length: 32 characters
cardBin String
The bin of the card.
More information:
- Maximum length: 32 characters
issuerName String
The issuer name of the card.
More information:
- Maximum length: 256 characters
rrn String
Retrieval Reference Number (RRN). This can be provided to track details of the payment, refund or dispute with the card issuer.
More information:
- Maximum length: 32 characters
Wallet
funding String
The funding type of the wallet. This parameter is returned when the value of paymentMethodType is GRABPAY_MY or GRABPAY_SG. Valid values are:
WALLETS: indicates a regular wallet payment using the wallet balance.BNPL_POSTPAID: indicates a buy-now-pay-later payment, and the user pays the full amount.BNPL_INSTALLMENT: indicates a buy-now-pay-later payment, and the user pays in installments.
More information:
- Maximum length: 20 characters
creditPayPlan CreditPayPlan
The installment plan information for an installment payment.
Note: This parameter is returned when the value of paymentResultInfo.funding is
BNPL_INSTALLMENT.
acquirerInfo AcquirerInfo
The information of the acquirer that processes the payment.
Response parameters
result Result REQUIRED
A fixed value, which is sent to APO to acknowledge that the notification is received.
Request
Response
More information
This section provides additional information about the key parameter. See the following parameter for details:
- paymentTime: The successful execution time of this payment by APO, that is, the date and time when the payment reaches a final state of success. This value is used as the start time of the subsequent cancellable and refundable time. For example, if the refundable time is 6 months, the final time to accept the refund is paymentTime plus 6 months.
Result process logic
Send the following message with fixed values to APO after receiving the notification, to acknowledge that the notification from APO is received:
If no such message is returned to APO due to operation issues or network issues, APO will send the notification again and again until the required message is returned by the merchant. Resending of the notification will be performed within 24 hours after the first notification is sent. The notification will be resent up to eight times, with an interval of 0s, 2min, 10min, 10min, 1h, 2h, 6h, and 15h.
Result/Error 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. |
| INVALID_API | F | The called API is invalid or not active. | Contact Antom Technical Support to resolve the issue. |
| CURRENCY_NOT_SUPPORT | F | The currency is not supported. | Contact Antom Technical Support for detailed reasons. |
| DO_NOT_HONOR | F | The payment is declined by the issuing bank. | Retry the payment using a different card or contact the issuing bank. |
| EXPIRED_CODE | F | The payment code is expired. | The user needs to refresh the payment code. |
| 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_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_CONTRACT | F | The parameter values in the contract do not match those in the current transaction. | Check whether the parameter values in the contract match those in the current transaction. If the values match, contact Antom Technical Support to troubleshoot the issue. |
| 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 Antom 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_BALANCE_NOT_ENOUGH | F | The merchant balance is not enough. | Call the interface again after the merchant has sufficient balance. |
| 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 methods are available. | Contact Antom Technical Support for detailed reasons. |
| ORDER_IS_CLOSED | F | The transaction is closed and cannot be paid again. | Use a new paymentRequestId to initiate a payment. |
| ORDER_NOT_EXIST | F | The order does not exist. | Check whether paymentId is correct. |
| 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 Tokenized 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. |
| PAYMENT_IN_PROCESS | U | The payment is being processed. | 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 rediectUrl to complete the payment. If not, the payment might already be completed. See Result process logic for details. |
| 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. |
| 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. |
| 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 insufficient. | 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_NOT_EXIST | F | The user does not exist on the wallet side. | Contact Antom Technical Support for detailed reasons. |
| 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. |
| VERIFY_TIMES_EXCEED_LIMIT | F | The current verification code failed to pass the payment verification too many times. | The user must get a new verification code. |
| VERIFY_UNMATCHED | F | The verification code is invalid. | The user must get a new verification code. |
| 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. |
| 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 is correct:
|