Antom, leading provider of tailored payment solutions

retrievePaymentSession

POST /v1/payments/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.

API Explorer

Request

URL
Method
POST
json
{
  "paymentSessionId": "PAYMENT_SESSIONID_20260129144822724_AUTO"
}

Response

json
{
  "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

S

Success

The interface is called successfully.

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.

PROCESS_FAIL

F

A general business failure occurred.

It is recommended that you contact Antom Technical Support to troubleshoot the issue.