• 简体中文
  • 订单查询

    适用市场:NG 尼日利亚 | ZA 南非

    /api/v2/payment/merchant/order/queryStatus

    请求参数

    参数类型长度NGZA说明
    orderIdstring32否否商户唯一订单号,与 orderNo 至少传一个
    orderNostring32否否PalmPay 平台订单号,与 orderId 至少传一个
    nonceStrstring—是—随机字符串
    requestTimeinteger—是—Unix 秒时间戳
    versionstring—是—V1.1

    是 必填 · 否 选填 · — 该市场不适用

    返回值

    字段类型NGZA说明
    orderIdstring是是商户唯一订单号
    orderNostring是是PalmPay 平台订单号
    merchantIdstring是是商户号
    amountlong是是交易金额(分)
    currencystring是是货币代码
    orderStatusinteger是是订单状态(见订单状态)
    productTypestring否是产品类型
    remarkstring否—备注信息
    errorMsgstring否—错误信息
    countrystring—是国家代码
    payMethodstring—是支付方式
    createdTimelong—是创建时间(Unix 毫秒时间戳)
    completedTimelong—是完成时间(Unix 毫秒时间戳)
    orderExpireMilliSeclong—是订单过期剩余毫秒数
    payerobject—否付款人信息(auth 订单返回)
    payer.accountNamestring—否持卡人姓名
    captureInfoarray—否关联的捕获订单列表(auth 订单返回)
    captureInfo[].orderNostring—否捕获订单的平台订单号
    captureInfo[].amountlong—否捕获金额(分)
    cardBrandstring—否卡品牌(即时支付原订单 / capture 订单返回,auth 订单不返回)
    bankNamestring—否发卡行,返回规则同 cardBrand
    cardLast4string—否卡号后四位,返回规则同 cardBrand
    cardCountrystring—否发卡国家,返回规则同 cardBrand
    ecistring—否3DS ECI 值,返回规则同 cardBrand
    cardTokenstring—否卡 Token(rememberCard=true 时返回)

    是 必定返回 · 否 条件返回 · — 不返回

    ZA 预授权场景注意:查询 auth 订单(captureMode=manual 创建的原始订单)时不返回 cardBrand / cardLast4 / cardCountry / eci,需通过 captureInfo 找到 capture 订单号后再查询 capture 订单获取卡信息。

    示例

    NG · POST

    bash
    
    curl 'https://open-gw-sandbox.palmpay-inc.com/api/v2/payment/merchant/order/queryStatus' \
      -H 'CountryCode: NG' -H 'Authorization: Bearer xxx' -H 'Content-Type: application/json' \
      -d '{"requestTime":1662171389940,"version":"V1.1","nonceStr":"xxx",
           "orderId":"1558616686273","orderNo":"242019052313044587518762420"}'
    
    json
    {
      "respCode": "00000000",
      "respMsg": "success",
      "data": {
        "orderId": "1558616686273",
        "orderNo": "242019052313044587518762420",
        "merchantId": "CH1913953825",
        "currency": "NGN",
        "amount": 900000,
        "orderStatus": 2,
        "remark": "test",
        "errorMsg": "message"
      }
    }

    ZA · 查询 capture 订单(含卡信息)

    适用于:即时支付原订单 / capture 后的子订单。

    curl 'https://open-gw-daily.palmpay-inc.com/api/v2/payment/merchant/queryorder?orderNo=24260610123227106892' \
      -H 'CountryCode: ZA' -H 'Authorization: Bearer xxx'
    
    json
    {
      "respCode": "00000000",
      "respMsg": "success",
      "data": {
        "country": "ZA",
        "amount": 130400,
        "orderNo": "24260907071635802373",
        "orderId": "1788765395809",
        "cardCountry": "ZA",
        "completedTime": 1788765470765,
        "orderExpireMilliSec": 0,
        "cardType": "debit_card",
        "orderStatus": 2,
        "eci": "05",
        "bankName": "Wema Bank",
        "payerAccountType": 12,
        "transType": "24",
        "merchantId": "125010905579101",
        "payMethod": "bank_card",
        "createdTime": 1788765395809,
       "currency": "ZAR",
       "cardBrand": "VISA",
        "cardLast4": "0036",
        "productType": "bank_card"
    }
    }

    ZA · 查询 auth 订单(含 captureInfo,无卡信息)

    适用于:captureMode=manual 创建的原始授权订单。不返回卡信息,需通过 captureInfo 找到 capture 订单号后再查卡信息。

    curl 'https://open-gw-daily.palmpay-inc.com/api/v2/payment/merchant/queryorder?orderNo=24260610012259245300' \
      -H 'CountryCode: ZA' -H 'Authorization: Bearer xxx'
    
    json
    
    {
      "respCode": "00000000",
      "respMsg": "success",
      "data": {
        "country": "ZA",
        "amount": 1000,
        "orderNo": "2426070123334445566",
        "capturedAmount": 1000,
        "orderId": "17123341123444",
        "captureInfo": [
          {
            "orderNo": "24260701233311244",
            "amount": 1000
          }
        ],
        "cardCountry": "ZA",
        "completedTime": 1782894853528,
        "orderExpireMilliSec": -30921,
        "cardType": "debit_card",
        "orderStatus": 2,
        "bankName": "CAPITEC BANK LIMITED",
        "payer": {
          "accountName": "palmer"
        },
        "payerAccountType": 12,
        "transType": "24",
        "merchantId": "124012503542121",
        "payMethod": "bank_card",
        "appId": "L112233445566778899",
        "createdTime": 1782894198074,
        "currency": "ZAR",
        "cardBrand": "MasterCard",
        "cardLast4": "1234",
        "cardToken": "sdarqwfasasqwf!sfadssd",
        "productType": "bank_card"
    }
    }

    ZA 查询逻辑总结

    queryorder(orderNo)
        │
        ├─ orderStatus = 2 且 captureMode = immediate
        │     → 直接返回 cardBrand / cardLast4 / cardCountry / eci
        │
        ├─ orderStatus = 5 (required_capture) 或 orderStatus = 2 且 captureMode = manual
        │     → 返回 captureInfo[] + payer,不返回卡信息
        │     → 拿 captureInfo[].orderNo 再查一次 queryorder
        │           → 返回 cardBrand / cardLast4 / cardCountry / eci
        │
        └─ captureInfo[].orderNo 对应的 capture 订单
              → 返回 cardBrand / cardLast4 / cardCountry / eci
    Endpoint
    GEThttps://open-gw-daily.palmpay-inc.com/api/v2/payment/merchant/queryorder?orderNo=24260610123227106892
    Request
    curl -X GET 'https://open-gw-daily.palmpay-inc.com/api/v2/payment/merchant/queryorder?orderNo=24260610123227106892' \
      -H 'CountryCode: ZA' \
      -H 'Authorization: Bearer xxx'
    Endpoint
    GEThttps://open-gw-daily.palmpay-inc.com/api/v2/payment/merchant/queryorder?orderNo=24260610123227106892
    Request
    curl -X GET 'https://open-gw-daily.palmpay-inc.com/api/v2/payment/merchant/queryorder?orderNo=24260610123227106892' \
      -H 'CountryCode: ZA' \
      -H 'Authorization: Bearer xxx'