Invalidate Order
Invalidate Order for Checkout with ShopeePay
Use this endpoint to invalidate the existing order using payment reference id for Checkout with ShopeePay if the order in the merchant’s system is closed/cancelled. Once the order payment reference id is invalidated successfully, the corresponding redirect_url_http
can no longer be used to make payment.
- URL: "/v3/merchant-host/order/invalidate"
Request Parameters
Field | Type | Mandatory | Description |
---|---|---|---|
request_id | string | Y | Unique identifier for request, accepts up to 64 characters. |
payment_reference_id | string | Y | Payment reference ID that corresponds to the order being invalidated. |
merchant_ext_id | string | Y | Unique identifier of merchant in merchant’s system. |
store_ext_id | string | Y | Unique identifier of store in merchant’s system. |
Sample API Request
REQUEST
{"request_id": "input-unique-request-id-here","payment_reference_id": "order-to-be-invalidated","merchant_ext_id": "external-merchant","store_ext_id": "external-store"}
Copy
Response Parameters
Field | Type | Description |
---|---|---|
request_id | string | Unique identifier for request. |
errcode | int32 | Error code to specify the error returned. |
debug_msg | string | Debug message to provide more information. |
Sample API Response
RESPONSE
{"request_id": "input-unique-request-id-here","errcode": 0,"debug_msg": "success"}
Copy
Response Code
Value | Description |
---|---|
-2 | A server dropped the connection |
-1 | A server error occurred |
0 | Success |
1 | The request parameters is invalid or a mandatory parameter is empty |
2 | Permission denied, often due to invalid status |
4 | Not found, often due to merchant/store/user/transaction not found |
1800 | A server error occurred |
1901 | QR code cannot be invalidated |