Skip to main content

Retrieve Order Payer

Retrieves the order payer with order number or merchant order number.

API URL

Request

Http Header

Attributes
  • Content-Language String

    • Language in which the response message will be used.
    • Currently, only English is supported.
    • Example value: en
    • Maximum length: 10
  • Content-Type String Required

    • Media type of the request body.
    • Required for operations with a request body.
    • Format: application/<format> (e.g., application/json)
    • Example value: application/json
  • sign String Required

    • Request signature using private-key cryptography.
    • Ensures the payment gateway can verify the request origin.
  • Partner-Id String Required

    • Merchant ID of your account.
    • Example value: 200001200101
    • Maximum length: 12

Http Body

  • requestTime Timestamp Required

    • If the request time is more than 15 minutes away from the current time, the request will be rejected. This parameter is used to prevent repeated requests for orders that should have been cancelled due to timeouts.
    • Example value: 1581493898000
  • bizContent Object

    You can use either merchantOrderNo or orderNo to specify an order. But you can't use the two parameters at the same time.

    • merchantOrderNo String Required

      • The merchant's reference number of the request. Used to track every request.
      • Example value: M965739182419
      • Maximum length: 64
    • orderNo String Required

      • The PayBy's unique identify number of the order.
      • Example value: 131658300517875854

Request Sample

Http Header
{
"Content-Language": "en",
"Content-Type": "application/json",
"sign": "Tu3fopHy1opsWVTAk12FSr8KsGMcFTQB0dOH4fPGrG8iKvhcGCsmCr4kOy3CBmv7zXpBNfMxoRW33YPz0Zm6503CDnqxlOZGaOCFSmwnsE01vDzZL489wPj5HEKJ7kk70/muDMiUwJubZoXVtmOGhpvvczJDYIhP/5kpwSkucdkjZwrlp7IGqoFHrgKgZXXieOsUlGJHb9xg+HchtCqCYaOvX+gIK/o88SdgogvGm8NW/N4dzBhnfbwPcC7ue3MO8mwCDkJ/5KavK8TEotSeTvFEyhAvzrd41ccg47SWXZ4UnhvwT06iIYZ67G4Xg24Bc97cQe1XFM9CPd+/8w7uDA==",
"Partner-Id": "200000000888"
}

Http Body
{
"requestTime": 1581405884647,
"bizContent": {
"merchantOrderNo": "M965739182419"
}
}

Response

Http Header

sign String Required

When PayBy sends response, PayBy will use its own private key to sign the message, and the merchant uses PayBy 's public key to verify the signature. If the verification is passed, it proves that the response was sent by PayBy and not faked by others.

Http Body

head

Attributes
  • applyStatus Enum Required

    • The result of the request. Possible values:
      • SUCCESS: Application successful.
      • FAIL: Application failed. Check the code and msg for the exact reason.
      • ERROR: Application error. Signature verification failed. Ensure the private key used for the signature and the public key uploaded on the PayBy portal are a valid key pair.
  • code String Required

    • Response code.
    • Example value: 0
    • Maximum length: 10
  • msg String

    • Description of the response code.
    • Maximum length: 200
  • traceCode String

    • Internal code for locating the error.

body

Notice

  • Body is returned only when applystatus = success, and code = 0.
  • If applystatus = error or failed; or applystatus = success, code !=0 , that indicates an error. Please check errors and try again.

payer Object

Attributes
  • payerMid String Required

    • Acquires order payer's member ID.
    • Example value: M280311181370
  • mobileNumberMask String Required

    • Payer mobile number with masking applied.
    • Example value: +86-13*******00
  • deviceId String Required

    • Payer device fingerprint.
    • Example value: 1581493898000
  • ipAddress String Required

    • Payer device IP address.
    • Example value: 1581493898000

Response Sample

Http Header
{
"sign": "nDdClX1tAyV3qcX/Epay6AXFNRGSsWd8ysWO9SgwPrNTetSePLA9C39mGp6qRbjJeqXLEnYLwSkBu5eKdtyVX3tflGLiV2kvRjVfYpTCjXdVL2Pcnv2w+ghjHe2jL988iklk7q5AjAgdtXNphpHcTes9pk6W3bVCbvijH6at0fExUtZ91L1LrnPGELT1IJm/lFW3w4KLh0Gxs7FzDPI9RDfUemObNlRzV8kCtkWahwPgs/hBnS69GyYDKN7ihQX2UiLuP239wl6IA+VG/ZZKHPhLs8bbuOS+LKWORIp6jRt+JsAx7c/Ot1RNyOnHKxPRKJ8bVTohEp39yUz/HwG8oA=="
}

Http Body
{
"body": {
"payer": {
"payerMid": "M280311181370",
"mobileNumberMask": "+86-13*******00",
"deviceId": "TI100999999999900",
"ipAddress":"127.0.0.1"
}
},
"head": {
"applyStatus": "SUCCESS",
"code": "0",
"msg": "SUCCESS",
"traceCode": "593827"
}
}