Skip to content

交易查询

  • Endpoint: POST /aggregate-pay/api/gateway/orderQuery
  • Tags: 收单

Description

对于未同步返回交易结果的请求,商户可以主动发起查询查回交易结果。

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
versionstringYesmaxLength: 8接口版本 当前值为:1.5
keyVersionstringYesmaxLength: 8密钥版本 当前值为:1
requestTimestringYesmaxLength: 32请求时间,符合rfc3339规范,格式:yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时间需要在当前时间两分钟内
appIdstringYesmaxLength: 64商户应用Id,PayerMax分配给商户应用的唯一标识
merchantNostringNomaxLength: 32商户号,商户与PayerMax业务签约时生成的唯一标识
dataobjectYes请求数据体
data.outTradeNostringYesmaxLength: 64原商户订单号

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

错误码

分类结果码结果描述
SYSTEM_ERRORSystem is busy, please try again later.系统错误;请联系PayerMax
REQ_TIME_OVER_TIMErequestTime effective in two minutes请求时间与服务端偏差超过2分钟,请检查requestTime后重新发起
TOO_MANY_REQUESTExceed request limitation, please retry later触发接口并发限流,请稍后重试
SIGN_VERIFY_FAILEDThe signature verify failed.签名错误;请核实签名
MERCHANT_INVALIDThe merchant has been offline.无效商户
MERCHANT_APP_INVALIDSignature key is not configured.无效商户APP
PARAMS_INVALID${field} length must be between ${min} and ${max},but your input value length is ${length}.Make sure all requests length is correct.无效参数-入参字段长度不符合要求;请参考官网字段描述
PARAMS_INVALID${field} must be ${type} , but your input is ${valueType}.Make sure all requests type is correct.无效参数-入参字段类型不正确;请参考官网字段描述
PARAMS_INVALID${field} is invalid,because ${field} is null.无效参数-入参字段不能为空;请参考官网字段描述
ORDER_NOT_EXISTThe order does not exist.订单不存在
FieldTypeRequiredConstraintsDescriptionEnum
codestringYes返回码,’APPLY_SUCCESS’代表成功。只代表接口请求成功,不代表订单状态。
msgstringYes返回描述,’Success.’。只代表接口请求成功,不代表订单状态。
dataobjectNo返回数据体
data.referencestringNomaxLength: 512附加数据,商户上送的值
data.outTradeNostringNomaxLength: 64商户订单号
data.tradeTokenstringNomaxLength: 64PayerMax交易流水号
data.totalAmountnumberYes标价金额,金额的单位为元。
data.currencystringYesmaxLength: 3标价币种
data.channelNostringNomaxLength: 64渠道订单号
data.thirdChannelNostringNomaxLength: 64三方单号
data.paymentCodestringNomaxLength: 64VA单号
data.countrystringYesmaxLength: 2用户支付的国家代码,大写字母
data.statusstringNomaxLength: 32交易状态,详见【交易状态
data.paymentDetailsarray[object]No支付信息,只有交易成功会返回支付信息,当交易失败时返回空数组。
data.paymentDetails[].paymentMethodTypestringNo支付方式类型,参见【收银台支付-支付方式类型】。
data.paymentDetails[].targetOrgstringNomaxLength: 64目标机构,用户支付所选择的目标机构; paymentMethodType为CARD的时不返回。
data.paymentDetails[].payAmountnumberNo支付金额
data.paymentDetails[].exchangeRatestringNo标价币种转换为支付币种的汇率
data.paymentDetails[].payCurrencystringNo支付币种
data.paymentDetails[].paymentTokenIDstringNo绑卡支付场景下,用于支付的授权ID,默认有效期为卡有效期,可通过【removePaymentToken】接口置为无效。
data.paymentDetails[].cardInfoobjectNo卡信息
data.paymentDetails[].cardInfo.cardOrgstringNomaxLength: 32卡组织,只有交易成功且用户选择卡组织支付时才返回。
data.paymentDetails[].cardInfo. countrystringNomaxLength: 2发卡国家
data.paymentDetails[].cardInfo.cardTypestringNomaxLength: 32卡类型,DEBIT、CREDIT等。
data.paymentDetails[].cardInfo.totalCardOrgarray[string]No卡的所有卡组织,双标卡会返回两个。
data.paymentDetails[].cardInfo.typestringNomaxLength: 32卡性质。PAN为真实卡;NETWORK_TOKEN为虚拟卡,如APPLEPAY。
data.paymentDetails[].cardInfo.sourcestringNomaxLength: 32卡信息来源。CARDAPPLEPAYGOOGLEPAY_PANGOOGLEPAY_CRYPTOGRAMNETWORK_TOKEN
data.paymentDetails[].cardInfo.cardBinNostringNomaxLength: 16卡bin号。
data.paymentDetails[].cardInfo.cardNumberstringNomaxLength: 32卡号,掩码返回。
data.paymentDetails[].cardInfo.cardHolderNamestringNomaxLength: 128持卡人姓名,掩码返回。
data.paymentDetails[].cardInfo.cardLast4stringNomaxLength: 4真实卡号后四位。
data.paymentDetails[].cardInfo.cardExpirationYearstringNomaxLength: 2卡有效年。
data.paymentDetails[].cardInfo.cardExpirationMonthstringNomaxLength: 2卡有效月。
data.paymentDetails[].cardInfo.cardIdentifierNo ⚠️stringNomaxLength: 19卡号,当paymentMethodType为CARD时掩码返回
data.paymentDetails[].cardInfo.cardIdentifierName ⚠️stringNomaxLength: 192卡姓名,当paymentMethodType为CARD时掩码返回
data.paymentDetails[].cardInfo. paymentTokenID ⚠️stringNomaxLength: 64绑卡支付场景下,用于支付的授权ID,默认有效期为卡有效期,可通过【removePaymentToken】接口置为无效。
data.paymentDetails[].cardInfo.threeDSResultobjectNo3ds结果
data.paymentDetails[].cardInfo.threeDSResult.threeDSVersionstringNomaxLength: 163ds版本 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)分配的唯一标识
data.paymentDetails[].cardInfo.threeDSResult.cavvstringNomaxLength: 24Cardholder Authentication Verification Value (CAVV) Authentication Verification Value (AVV) Universal Cardholder Authentication Field (UCAF)
data.paymentDetails[].cardInfo.threeDSResult.xidstringNomaxLength: 64身份验证结果标识
data.paymentDetails[].cardInfo.avsResultstringNomaxLength: 32avs结果
data.paymentDetails[].additionalDataobjectNo包含有关付款的更多详细信息
data.paymentDetails[].additionalData.rrnstringNo交易检索号
data.paymentDetails[].additionalData.authCodestringNo发卡行授权码
data.feesobjectNo费用信息,支付成功且存在费用时才返回。
data.fees.merFeeobjectNo商户税费
data.fees.merFee.urlstringYesmaxLength: 256发票地址,打开地址可预览发票
data.fees.merFee.amountstringYesmaxLength: 20费用金额
data.fees.merFee.currencystringYesmaxLength: 3费用币种
data.resultCodestringNo交易状态结果描述
data.resultMsgstringYes交易状态结果描述,仅失败时有值
data.createTimestringNo订单创建时间
data.confirmPayTimestringNo订单流转到外部渠道时间点
data.completeTimestringNo订单完成时间
data.cashierCountrystringYes收银台模式下,在收银台上发起支付的国家。支付成功时返回。
data.issuerResponseCodestringNo发卡行标准错误码
data.issuerResponseMsgstringNo发卡行标准错误描述

Response Example: 1

成功示例

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",
          "country": "SA",
          "cardIdentifierNo": "400555******0001",
          "cardIdentifierName": "**ngwei"
        },
        "payAmount": 10,
        "exchangeRate": "1",
        "paymentMethod": "CARD",
        "payCurrency": "SAR",
        "paymentMethodType": "CARD",
        "paymentTokenID": "PMTOKEN20230424072005899168200035002"
      }
    ],
    "fees": {
      "merFee": {
        "url": "https://cashier-n-test-new.payermax.com/static/invoice.html?country=AE&merchantNo=P01010113843429&timestamp=1687769788704&version=1.0&orderTaxToken=XWXFKKBOPExplK4aX0r7wgiMtiAMLBKObPFdCMpM9HmCq3AAOob%252BcAZOkP27Kh3W",
        "amount": "100",
        "currency": "SAR"
      }
    },
    "status": "SUCCESS",
    "resultMsg": ""
  }
}

Response Example: 2

token支付-首次

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

此页面的内容有帮助吗?

感谢您帮助改进 PayerMax 产品文档!

Released under the MIT License.