H Honor
EN
DiDi finanzas

Documentation

Provides integration guides, API documentation, testing instructions and other information needed throughout the integration process

2.4 Cancel Order

2.4 Cancel Order

  • Path: /external/cancel/v1

  • Method: POST

  • API Description: This is the API for cancelling the order. Only the PENDING status orders can be canceled.

Request Message

Request Headers

Field Name Field Description Parameter Value Present (M/O/C) Remarks
Content-Type Content Type application/json M
Authorization This is the partner’s identity authentication value. Bearer {ACCESS-TOKEN} M For details, please refer to "Part II DiDi BNPL Partner Configuration&Env. Setup".
The partner can get the ACCESS-TOKEN value from the Token API call.
When the access expires, call the Token API again to get the new access token.
X-Paylater-Request-Id uuid uuid.
Example: 550e8400-e29b-41d4-a716-446655440000
M Mandatory UUID v4 string. DiDi will reject requests with invalid format.

Request Body

Field Name Type Field Description Present (M/O/C) Remarks
partnerOrderId String Merchant-side payment document Id. M Only the PENDING status orders can be canceled.

Request Example

{
    "partnerOrderId": "1e1e51a8-xxxx-11ef-b32d-ca3c6358d263"
}

Response Message

Response Header

Field Name Field Description Parameter Value Present (M/O/C) Remarks
Content-Type Content Type application/json M

Response Body

Field Name Type Field Description Present (M/O/C) Remarks
code String Return Code M Enumeration Value:
SUCCESS
FAILED
RATE_LIMIT
INVALID_TOKEN
message String Response Code Description M
error Object Error O
errorCode String Error code O
errorMessage String Error Code Description O

Response Example

{
  "code": "SUCCESS",
  "message": "SUCCESS",
  "error": null
}
Copied successfully