submitPay
Call this API to initiate a payment request. The system processes the transaction based on the request parameters and returns the payment status, a payment link used to invoke the cashier page, or a unique payment request ID.
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
paymentSessionId String  REQUIRED
Payment session ID.
More information:
- Maximum length: 64 characters
paymentAmount Amount Â
Payment amount.
order Order Â
Order information.
Response parameters
result Result  REQUIRED
The result of the API call.
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.
More information:
- Maximum length: 64 characters
paymentAmount Amount Â
The payment amount.
paymentCreateTime Datetime Â
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".
applinkUrl URL Â
The URL that redirects users to open an app when the target app is installed, or to open a WAP page when the target app is not installed. For Android, the URL is a Native App Link. For iOS, the URL is a Universal Link.
More information:
- Maximum length: 2048 characters
normalUrl URL Â
The URL that redirects users to a WAP or WEB page in the default browser or the embedded WebView.
More information:
- Maximum length: 2048 characters
schemeUrl URL Â
The URL scheme that redirects users to open an app in an Android or iOS system when the target app is installed.
More information:
- Maximum length: 2048 characters
acquirerInfo AcquirerInfo Â
The information of the acquirer that processes the payment.Â
Request
Response
Result/Error codes
resultCode | resultStatus | resultMessage | Further action |
|
| Success | The payment is successful, no further action is needed. |
|
| The 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. |
|
| A 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. |
|
| An API call has failed, which is caused by unknown reasons. | Call the interface again to resolve the issue. If not resolved, contact APO Technical Support. |
|
| The 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. |
|
| The merchant status is abnormal because restrictions exist. | Contact APO Technical Support for detailed reasons. |
|
| The card used for the transaction is not supported. | Use another card to pay the transaction. |
|
| 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 APO Technical Support. |
|
| The payment is declined by the issuing bank. | Retry the payment using a different card or contact the issuing bank. |
|
| 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 APO Technical Support. |
|
| 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 APO Technical Support when one of the following conditions is met:
|
|
| The user status is abnormal on the wallet side. | Contact APO Technical Support to know the specific reasons. |
|
| 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. |