Order Inquiry API

Endpoint
POST {BASE_URL}/api/v2.0/payments/inquiryPayment

The Order Inquiry API allows querying the details of a payment order by the AlphaPay order ID.

Request Body
paymentIdstringREQUIRED

AlphaPay order ID

Order Inquiry Request Body
{
    "paymentId": "string"
}

Response (200 OK)
scenarioCodestring

Scenario code, representing the payment scenario, see more details at scenarioCode.
Allowed values: ONLINE_QRCODE ONLINE_WEB JSAPI NATIVE_JSAPI ONLINE_WAP APP MINI_APP CREDIT_CARD OFFLINE_QRCODE OFFLINE

paymentRequestIdstring

Merchant order ID

orderobject

Order Information

Hide child parameters
order.orderAmountobject

The amount of the order

Hide child parameters
order.orderAmount.valuestring

The value of order amount. All amount figures are based on the minimum denomination unit of given currency. Take CAD as an example, 100 means 1.00CAD.
If the currency is CNY, it must be higher than 0.01CAD after exchange rate conversion, otherwise, the order can be created, but an "amount error" will be thrown.

order.orderAmount.currencystring

Currency code, allowed values: CAD/USD CNY

order.descriptionstring

Title of the order (maximum length 128 characters) <= 128 characters

order.notifyUrlstring

Payment notification URL, the address to push the payment success notification after the payment is successful, see Notification for details

order.redirectUrlstring

Payment redirect URL, the address that will be redirected to after a successful payment.

paymentCreateTimestring <date-time>

Order creation time
Follow the ISO8601 standard, e.g. 2019-05-28T12:12:12+08:00

paymentExpireTimestring <date-time>

Payment expiration time
Follow the ISO8601 standard, e.g. 2019-05-28T12:12:12+08:00

paymentTimestring <date-time>

Payment completion time
Follow the ISO8601 standard, e.g. 2019-05-28T12:12:12+08:00

paymentIdstring

AlphaPay order ID

paymentStatusstring

Order status,please refer to paymentStatus

  • OFFLINE_QRCODE: Waiting for payment to be completed
  • CLOSED: Payment order is closed
  • FAILED: Order creation is failed or payment is failed
  • SUCCESS: Payment succeeded
  • PARTIAL_REFUND: Partially refunded
  • FULL_REFUND: Fully refunded
resultobject

Process result

Hide child parameters
result.resultCodestring

Process result code, please refer to resultCode

result.resultMessagestring

Process result message

result.resultStatusstring

The status of an API call, please refer to resultStatus

  • S: API call succeeded.
  • F: API call failed, the resultMessage field will provide a detailed description of the error, which could be caused by either the merchant or the platform, when an error occurs during API invocation.
  • U: In cases where the handling result is unknown or in an intermediate state. Such as receiving a PAYMENT_IN_PROCESS status after submitting a payment order, the query interface can be used to confirm the status of the payment result.
Order Inquiry Response
{
    "scenarioCode": "APP",
    "paymentRequestId": "string",
    "order": {
        "orderAmount": {
            "value": "string",
            "currency": "CAD"
        },
        "description": "string",
        "notifyUrl": "string",
        "redirectUrl": "string"
    },
    "paymentCreateTime": "2019-08-24T14:15:22Z",
    "paymentExpireTime": "2019-08-24T14:15:22Z",
    "paymentTime": "2019-08-24T14:15:22Z",
    "paymentId": "string",
    "paymentStatus": "PAYMENT_IN_PROCESS",
    "result": {
        "resultCode": "string",
        "resultMessage": "string",
        "resultStatus": "S"
    }
}