verifyAndCompletePayment

POST /v1/payments/verifyAndCompletePayment

This API is used for one-time password (OTP) verification and to proceed with the payment.

Request parameters

verifyMethod Object  REQUIRED

Container for for payment verification type.

Show child parameters

paymentId String  REQUIRED

The unique ID that is assigned by APO to identify a payment.

More information:

  • Maximum length: 64 characters

verifyRequestId String  REQUIRED

The unique ID assigned by a merchant to identify a verify payment request. APO uses this field for idempotence control.

More information:

  • Maximum length: 64 characters

Response parameters

result Result  REQUIRED

The result of the API call.

Show child parameters

paymentRequestId String  

The unique ID that is assigned by a merchant to identify a payment request.

Note: This field is returned when resultCode is PAYMENT_IN_PROCESS.

More information:

  • Maximum length: 64 characters

verifyRequestId String  

The unique ID that is assigned by a merchant to identify a payment request.

Note: This field is returned when resultCode is PAYMENT_IN_PROCESS.

More information:

  • Maximum length: 64 characters

paymentId String  

The unique ID that is assigned by APO to identify a payment.

Note: This field is returned when resultCode is PAYMENT_IN_PROCESS.

More information:

  • Maximum length: 64 characters

paymentAmount Amount  

The payment amount that the merchant requests to receive in the order currency.

Note: This field is returned when resultCode is PAYMENT_IN_PROCESS.

Show child parameters

paymentCreateTime Datetime  

The date and time when the payment is created.

Note: This field is returned when resultCode is PAYMENT_IN_PROCESS.

More information:

  • The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".

acquirerInfo AcquirerInfo  

The information of the acquirer that processes the payment. 

Show child parameters
API Explorer
Sample CodesRun in Sandbox

Request

URL
Request Body

Response

Response Body


Result/Error codes

CodeValueMessageFurther action
SUCCESSSSuccess

The payment is successful, no further action is needed.

ACCESS_DENIEDFAccess is denied.

Contact APO Technical Support for detailed reasons.

CURRENCY_NOT_SUPPORT FThe currency is not supported.

Contact APO Technical Support for detailed reasons.

DO_NOT_HONORFThe payment is declined by the issuing bank.

Retry the payment using a different card or contact the issuing bank.

EXPIRED_CODEFVerification code window is expired.

The buyer needs to initiate the payment again.

FRAUD_REJECTFThe transaction cannot be further processed because of risk control. If the user has already paid for the transaction, the transaction will be refunded.

Contact APO Technical Support when one of the following conditions is met:

  • You want to make an appeal. 
  • The user does not receive the refund within two weeks.  
INVALID_ACCESS_TOKENFThe access token is expired, revoked, or does not exist.

Check whether accessToken is correct. If not correct, pass in the correct value. If correct, contact APO Technical Support for detailed reasons.

INVALID_CONTRACTFThe 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 APO Technical Support to troubleshoot the issue.

INVALID_MERCHANT_STATUSFThe merchant status is abnormal because restrictions exist.

Contact APO Technical Support for detailed reasons.

INVALID_PAYMENT_CODEFThe payment code cannot be accepted by Alipay+.

Choose other payment methods. Contact APO Technical Support if the payment method is supported.

INVALID_PAYMENT_METHOD_META_DATAFThe payment method metadata is invalid.

Check whether payment method metadata is correct. If correct, contact APO Technical Support.

KEY_NOT_FOUNDFThe private key or public key of APO or the merchant is not found.

Check whether the private key or public key exists. If not, upload the private key in APO Dashboard.

MERCHANT_KYB_NOT_QUALIFIEDFThe 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.

MERCHANT_NOT_REGISTEREDFThe merchant is not registered.

Please register the merchant by using the registration interface. Contact APO Technical Support if failed to call the registration API.

NO_INTERFACE_DEFFAPI is not defined.

Check whether the URL is correct. Please refer to the endpoint in the API documentation.

NO_PAY_OPTIONSFThe currency is not supported for the transaction.

Check whether the currency is supported by the payment method, or check whether the payment method and currency are consistent with the contract. Contact APO Technical Support for detailed reasons.

ORDER_IS_CANCELEDFThe request you initiated has the same paymentRequestId as the previously paid transaction, which is canceled.

Use a new paymentRequestId to initiate the payment again.

ORDER_IS_CLOSEDFThe paymentRequestId of your request is already used for a transaction, which is closed.

Use a new paymentRequestId to initiate a payment.

PARAM_ILLEGALFThe 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_LIMITFThe 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 APO technical support to know the specific limitation.

PAYMENT_COUNT_EXCEED_LIMITFThe maximum number of payments exceeds the limit that is specified by the payment method.

Contact APO Technical Support to know the specific limitation.

PAYMENT_NOT_QUALIFIEDFThe merchant is not qualified to pay because the merchant is not registered, does not have a contract for Auto Debit, or is forbidden to make a payment.

Contact APO Technical Support for detailed reasons.

PROCESS_FAILFA general business failure occurred.

Do not retry. Human intervention is usually needed. It is recommended that you contact APO Technical Support to troubleshoot the issue.

REPEAT_REQ_INCONSISTENTFThe amount or currency is different from the previous request.

Ensure all the fields in the requests are the same or use a new paymentRequestId to initiate the payment again.

RISK_REJECTFThe 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 APO Technical Support. 

SETTLE_CONTRACT_NOT_MATCHFNo matched settlement contract can be found.

Check the following for a solution:

  1. Specify one settlement currency from the multiple currencies that the merchant signed up for.
  2. Check if the settlement currency is specified in the settlement contracts.
  3. The merchant didn't sign a settlement contract. Contact APO Technical Support.
SYSTEM_ERRORFA system error occurred.

Do not retry, and contact APO Technical Support for more details.

USER_AMOUNT_EXCEED_LIMITFThe 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 APO Technical Support.

USER_BALANCE_NOT_ENOUGHFThe 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_QUALIFIEDFThe 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.

PAYMENT_IN_PROCESSUThe payment is being processed.

Get any of the URLs (appLinkUrl, normalUrl, schemeUrl) and open the cashier page. If no URL is returned, call the pay API again with a new paymentRequestId value. If the issue persists, contact APO Technical Support.

REQUEST_TRAFFIC_EXCEED_LIMITUThe request traffic exceeds the limit.

Call the API again to resolve the issue. If not resolved, contact APO Technical Support.

UNKNOWN_EXCEPTIONUAn API call has failed, which is caused by unknown reasons.

Call the API again to resolve the issue. If not resolved, contact APO Technical Support.

USER_NOT_EXISTFThe user does not exist on the wallet side.

Contact APO Technical Support for detailed reasons.

ORDER_NOT_EXISTFThe order does not exist.

Check whether paymentId is correct.

ORDER_STATUS_INVALIDFThe transaction cannot be further processed because the order status is invalid.

Check the order status of the transaction or contact APO Technical Support for detailed reasons.   

USER_PAYMENT_VERIFICATION_FAILEDFUser fails to pass the payment verification in the OTP verification method.

Contact APO Technical Support to know the specific reasons.

USER_STATUS_ABNORMALFThe user status is abnormal on the wallet side.

Contact APO Technical Support to know the specific reasons.

VERIFY_TIMES_EXCEED_LIMITFThe current verification code failed to pass the payment verification too many times.

The user must get a new verification code.

VERIFY_UNMATCHEDFThe verification code is invalid.

The user must get a new verification code.

AUTHENTICATION_REQUIREDF3D Secure authentication is required.

Reinitiate the payment and redirect the user to perform 3D Secure authentication. 

SELECTED_CARD_BRAND_NOT_AVAILABLEFThe card brand that the user selected to pay is not available.

The card brand that the user selected to pay is not available. 

PAYMENT_PROHIBITEDFThe payment cannot be processed because the goods are prohibited from sale in the country.

You are not allowed to appeal against this transaction. 

INVALID_EXPIRATION_DATEFThe 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:

  • If not correct, pass in the correct value.
  • If correct, contact APO Technical Support for detailed reasons.
INVALID_CARD_NUMBERFThe number of the card used for the transaction is invalid.

Check whether the value of paymentMethod.paymentMethodMetaData.cardno is correct:

  • If not correct, pass in the correct value and try again.
  • If correct, this card is not supported by the transaction, use another card to pay the transaction.
CARD_NOT_SUPPORTEDFThe card used for the transaction is not supported.

Use another card to pay the transaction.