retrievePaymentSession
Use this API after payment completion to retrieve transaction details including final quantity, price, discounts, promotions, and custom data.
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 paymentSessionId cannot both be null. If both paymentRequestId and paymentSessionId are specified, paymentSessionId takes precedence.
More information:
- Maximum length: 64 characters
paymentSessionId String Â
The encrypted ID that is assigned by APO to identify a payment session.
Note: paymentRequestId and paymentSessionId cannot both be null. If both paymentRequestId and paymentSessionId are specified, paymentSessionId takes precedence.
More information:
- Maximum length: 64 characters
Response parameters
result Result  REQUIRED
The result of the API call.
order Order Â
The order information.
Note: This parameter is returned in CKP and Element contexts.
Request
{
"paymentSessionId": "PAYMENT_SESSIONID_20260129144822724_AUTO"
}Response
{
"result": {
"resultCode": "SUCCESS",
"resultMessage": "success.",
"resultStatus": "S"
},
"order": {
"goods": [
{
"goodsQuantity": "2",
"goodsUnitAmount": {
"currency": "CNY",
"value": "10"
},
"goodsDiscountAmount": {
"currency": "CNY",
"value": "5"
},
"referenceGoodsId": "amsdm_good_tony_c_20230227_095825_922"
}
],
"orderAmount": {
"currency": "CNY",
"value": "20"
},
"shipping": {
"shipToEmail": "pen***@amsdm.com",
"shippingAddress": {
"address1": "**************",
"address2": "yellow dragon E",
"city": "hangzhou",
"region": "CN",
"state": "Zhejiang",
"zipCode": "310000"
},
"shippingCarrier": "EMS",
"shippingName": {
"firstName": "*****",
"fullName": "D***u",
"lastName": "Liu",
"middleName": "Skr"
},
"shippingPhoneNo": "+86183******78"
}
}
}Result/Error codes
resultCode | resultStatus | resultMessage | Further action |
|
| Success | The interface is called successfully. |
|
| 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. |
|
| A general business failure occurred. | It is recommended that you contact Antom Technical Support to troubleshoot the issue. |