Cancel Order API

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

The Cancel Order API is used to cancel a payment order based on the AlphaPay platform payment ID.

Request Body
paymentIdstringREQUIRED

AlphaPay order ID

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

Response (200 OK)
paymentRequestIdstring

Merchant order ID

paymentIdstring

AlphaPay order ID

cancelTimestring <date-time>

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

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.
Cancel Order Response
{
    "paymentRequestId": "string",
    "paymentId": "string",
    "cancelTime": "2019-08-24T14:15:22Z",
    "result": {
        "resultCode": "string",
        "resultMessage": "string",
        "resultStatus": "S"
    }
}