Skip to content

Transaction Inquiry

  • Endpoint: POST /aggregate-pay/api/gateway/orderQuery
  • Tags: Collection Service

Description

For requests that do not return transaction results synchronously, merchants can initiate queries to retrieve transaction results.

Parameters

FieldInTypeRequiredConstraintsDescription
Content-TypeheaderstringYes
signheaderstringYes签名信息请参考技术文档

Parameter Examples

  • Content-Type: "application/json"
  • sign: "FPFVT3o227JrFRbqu19boZCpVVTF9KznxyRawUmxpfXilHV/0yK46haPhAjNu1hPUMy7Vw/ILXhfzffNm4Fj0apWknlTY9OJxnSoQxS9BTFtc61tn5yV1q69x/kkBl82/qwg+XTJ4fOzy7Mar3VaC1E2PlDA6RkkKBUyNE6RYgsdB+Su7an4+4HVTNAnoe74WyvBgxTLMNg28igBTdqxaO3w/UBY6ObVp7vkqkQGdL1Y+HgmMYaAVwrM3+ALWGId0sJ+YqTY4WJ+0xCRGhaSnybiIjZsQEYyID68WNUfuavDLDsEhaMm/HfQvf5p0R1Ltovp3wwJnEbQcjY458iX5A=="

Request Body

Content-Type: application/json

FieldTypeRequiredConstraintsDescriptionEnum
versionstringYesAPI version. Current value: 1.5
keyVersionstringYesSignature Algorithm Version, Current value: 1
requestTimestringYesRequest time, compliant with rfc3339 specification, format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX The time must be within two minutes of the current time
appIdstringYesMerchant AppId,The unique identifier assigned to the merchant app by PayerMax
merchantNostringNomaxLength: 32Merchant Id, the unique identifier generated when the merchant signs the contract with PayerMax
dataobjectYesRequest data body
data.outTradeNostringYesmaxLength: 64Merchant order id

Example

json
{
  "version": "1.5",
  "keyVersion": "1",
  "requestTime": "2022-01-17T07:51:15.597+00:00",
  "appId": "a0dddd1f622243cb9aa1b676e808b5f8",
  "merchantNo": "02021382719993",
  "data": {
    "outTradeNo": "P1642410680681"
  }
}

Responses

200

FieldTypeRequiredConstraintsDescriptionEnum
codestringYesReturn code, ‘APPLY_SUCCESS’ means success.It only represents the success of the interface request, not the order status.
msgstringYesReturn message, ‘Success.’.It only represents the success of the interface request, not the order status.
dataobjectNoReturn data body
data.referencestringNomaxLength: 512Additional data, the value sent by the merchant
data.outTradeNostringNomaxLength: 64Merchant order id.
data.tradeTokenstringNomaxLength: 64PayerMax order id
data.totalAmountnumberYesOrder amount, the unit of amount is yuan。
data.currencystringYesmaxLength: 3Order Currency
data.countrystringYesmaxLength: 2The country code that the user pays for, in capital letters
data.channelNostringNomaxLength: 64Channel Order No.
data.thirdChannelNostringNomaxLength: 64third channel No
data.paymentCodestringNomaxLength: 64VA No
data.statusstringNomaxLength: 32trading status【status
data.resultMsgstringYesTransaction status result description, only has a value when it fails
data.paymentDetailsarray[object]NoPayment information, whcih is only returned when a transaction is successful. If the transaction fails, an empty array will be returned.
data.paymentDetails[].paymentMethodTypestringNomaxLength: 64Payment method type, the payment method selected by the user to pay. See 【Cashier Payment-Payment Method List
data.paymentDetails[].targetOrgstringNomaxLength: 64The target organization selected by users for payment, which wiil not not be returned when the paymentMethodType is CARD.
data.paymentDetails[].payAmountintegerNouser pay amount
data.paymentDetails[].payCurrencystringNouser pay currency
data.paymentDetails[].paymentTokenIDstringNoIn the card payment scenario, the authorization ID used for payment.The default validity period is the card validity period, which can be passed【removePaymentToken】 interface is set to invalid.
data.paymentDetails[].cardInfoobjectNocard info
data.paymentDetails[].cardInfo.cardOrgstringNomaxLength: 32Card organization, only returned when the transaction is successful and the user chooses card organization to pay
data.paymentDetails[].cardInfo.countrystringNomaxLength: 2Card issuing country
data.paymentDetails[].cardInfo.cardTypestringNomaxLength: 32Card funding type, such as DEBITCREDIT and so on.
data.paymentDetails[].cardInfo.totalCardOrgarray[string]NoBrand of the card.Dual-standard card returns two brands.
data.paymentDetails[].cardInfo.typestringNomaxLength: 32Type of the card. PAN is a full pan; NETWORK_TOKEN is not a full pan, such as APPLEPAY.
data.paymentDetails[].cardInfo.sourcestringNomaxLength: 32Source of the card. CARDAPPLEPAYGOOGLEPAY_PANGOOGLEPAY_CRYPTOGRAMNETWORK_TOKEN
data.paymentDetails[].cardInfo.cardBinNostringNomaxLength: 16Card BIN number.
data.paymentDetails[].cardInfo.cardNumberstringNomaxLength: 32Masked card number.
data.paymentDetails[].cardInfo.cardHolderNamestringNomaxLength: 128Masked cardholder name.
data.paymentDetails[].cardInfo.cardLast4stringNomaxLength: 4The last four digits of the card.
data.paymentDetails[].cardInfo.cardExpirationYearstringNomaxLength: 2Two-digit number representing the card’s expiration year.
data.paymentDetails[].cardInfo.cardExpirationMonthstringNomaxLength: 2Two-digit number representing the card’s expiration month.
data.paymentDetails[].cardInfo.cardIdentifierNo ⚠️stringNomaxLength: 19Card number, when the paymentMethodType is CARD, the mask returns
data.paymentDetails[].cardInfo.cardIdentifierName ⚠️stringNomaxLength: 192Card name, when the paymentMethodType is CARD, the mask returns
data.paymentDetails[].cardInfo.paymentTokenID ⚠️stringNomaxLength: 64In the card payment scenario, the authorization ID used for payment.The default validity period is the card validity period, which can be passed【removePaymentToken】 interface is set to invalid.
data.paymentDetails[].cardInfo.threeDSResultobjectNo3ds result
data.paymentDetails[].cardInfo.threeDSResult.threeDSVersionstringNomaxLength: 163ds version 1.0.2, 2.1.0, 2.2.0
data.paymentDetails[].cardInfo.threeDSResult.enrolledstringNomaxLength: 1Status of Authentication eligibility. Y - Yes, Bank is participating in 3-D Secure protocol and will return the ACSUrl N - No, Bank is not participating in 3-D Secure protocol U - Unavailable, The DS or ACS is not available for authentication at the time of the request B - Bypass, Merchant authentication rule is triggered to bypass authentication in this use case. (3DS Flex premium only)Y, N, U, B
data.paymentDetails[].cardInfo.threeDSResult.authenticationStatusstringNomaxLength: 1Transactions status result identifier. Y - Successful Authentication N - Failed Authentication U - Unable to Complete Authentication A - Successful Attempts Transaction R - Authentication Rejected (Merchant must not submit for authorisation)Y, N, U, A, R
data.paymentDetails[].cardInfo.threeDSResult.ecistringYesmaxLength: 2Electronic Commerce Indicator (ECI). Possible Values: 02 or 05 - Fully Authenticated Transaction 01 or 06 - Attempted Authentication Transaction 00 or 07 - Non 3-D Secure Transaction Mastercard - 02, 01, 00 Visa - 05, 06, 07
data.paymentDetails[].cardInfo.threeDSResult.dsTransactionIdstringNomaxLength: 64the Directory Server (DS) assigned unique identifier
data.paymentDetails[].cardInfo.threeDSResult.cavvstringNomaxLength: 24Cardholder Authentication Verification Value (CAVV) Authentication Verification Value (AVV) Universal Cardholder Authentication Field (UCAF)
data.paymentDetails[].cardInfo.threeDSResult.xidstringNomaxLength: 64Authentication result ID
data.paymentDetails[].cardInfo.avsResultstringNoavs result
data.paymentDetails[].exchangeRatestringNoThe exchange rate for converting the price currency into the payment currency
data.paymentDetails[].additionalDataobjectNoContains additional information about the payment
data.paymentDetails[].additionalData.rrnstringNoRetrieval Reference Number
data.paymentDetails[].additionalData.authCodestringNoAuthorization Code
data.feesobjectNoFee information, which is only returned if the payment is successful and there are fees associated with it.
data.fees.merFeeobjectNomerchant tax fee
data.fees.merFee.urlstringYesmaxLength: 256Invoice URL, open the URL to preview the invoice
data.fees.merFee.amountstringYesmaxLength: 20fee amount
data.fees.merFee.currencystringYesmaxLength: 3fee currency
data.cashierCountrystringNomaxLength: 2Country where payment is initiated at the checkout.
data.resultCodestringNoTransaction status result description.
data.createTimestringNoOrder creation time
data.confirmPayTimestringNoTime when order is routed to an external channel
data.completeTimestringNoOrder completion time
data.issuerResponseCodestringNoissuer response code
data.issuerResponseMsgstringNoissuer response message

Response Example: 1

SUCCESS

json
{
  "msg": "Success.",
  "code": "APPLY_SUCCESS",
  "data": {
    "reference": "reference",
    "country": "SA",
    "totalAmount": 10,
    "outTradeNo": "DEVTest1669616467952",
    "currency": "SAR",
    "channelNo": "DMCP000000000177005",
    "thirdChannelNo": "4ikqJ6ktEqyRawE1dvqb9c",
    "paymentCode": "2312121212",
    "tradeToken": "T2024062702289232000001",
    "paymentDetails": [
      {
        "targetOrg": "*",
        "cardInfo": {
          "cardOrg": "VISA",
          "cardNumber": "400555****0001",
          "cardHolderName": "**ngwei",
          "country": "SA"
        },
        "payAmount": 10,
        "exchangeRate": "1",
        "payCurrency": "SAR",
        "paymentMethodType": "CARD",
        "paymentTokenID": "PMTOKEN20230424072005899168200035002"
      }
    ],
    "status": "SUCCESS",
    "resultMsg": ""
  }
}

Response Example: 2

token-first

json
{
  "msg": "Success.",
  "code": "APPLY_SUCCESS",
  "data": {
    "country": "SA",
    "channelNo": "UPC724600175093989606351000042",
    "thirdChannelNo": "5db84623e38343f08a4cd3237e3019ae",
    "outTradeNo": "orderAndPayOutTradeNo1750939895336PuVDesFayU",
    "currency": "SAR",
    "tradeToken": "T2025062612724647000120",
    "paymentDetails": [
      {
        "cardInfo": {
          "cardOrg": "MADA",
          "country": "SA",
          "cardIdentifierNo": "455036******5105",
          "cardIdentifierName": "**rdHolderName",
          "paymentTokenID": "PMTOKEN20250626121135955468420000003"
        },
        "payAmount": 100,
        "payCurrency": "SAR",
        "paymentTokenID": "PMTOKEN20250626121135955468420000003",
        "paymentMethodType": "CARD"
      }
    ],
    "completeTime": "2025-06-26T12:11:36.142Z",
    "resultMsg": "",
    "totalAmount": 100,
    "status": "SUCCESS"
  }
}

Enum Reference

data.paymentDetails[].cardInfo.threeDSResult.enrolled

  • Y
  • N
  • U
  • B

data.paymentDetails[].cardInfo.threeDSResult.authenticationStatus

  • Y
  • N
  • U
  • A
  • R

Was this page helpful?

Thank you for your help in improving PayerMax Product Docs!

Released under the MIT License.