Cancel an Order
When the merchant creates an order but later decides it should not be paid, the merchant can cancel the order.
- The Merchant Server needs to send a request to the Zalopay Server to cancel the order.
- An order can only be canceled if it has not been paid successfully.
- Once an order is canceled, it can no longer be paid.
- application/json
- application/x-www-form-urlencoded
Request Body required
- app_id integer required
This is a Zalopay-provided identifier specific to the merchant's service or application, established during the integration agreement for payment methods.
- app_trans_id string required
The transaction ID that will be canceled (TXID of order transaction).
- mac string required
Authentication information mac = HMAC(hmac_algorihtm, mac key, hmacinput), see as below:
- hmac_algorihtm: is a security method registered by Merchant with Zalopay, the default is HmacSHA256.
- mac key: provided by Zalopay at registration.
- hmacinput = app_id +|
+ app_trans_id +|
+ mac keyPlease refer to secure data transmission for detailed information.
Request Body required
- app_id integer required
This is a Zalopay-provided identifier specific to the merchant's service or application, established during the integration agreement for payment methods.
- app_trans_id string required
The transaction ID that will be canceled (TXID of order transaction).
- mac string required
Authentication information mac = HMAC(hmac_algorihtm, mac key, hmacinput), see as below:
- hmac_algorihtm: is a security method registered by Merchant with Zalopay, the default is HmacSHA256.
- mac key: provided by Zalopay at registration.
- hmacinput = app_id +|
+ app_trans_id +|
+ mac keyPlease refer to secure data transmission for detailed information.
- 200
OK
- application/json
- Schema
- Example (from schema)
Schema
- return_code integer
Status code.
Please refer to status code for possible values - return_message string
Description of status code.
- sub_return_code integer
Status code detail.
Please refer to sub status code for possible values - sub_return_message string
Description of status code detail.
{
"return_code": 0,
"return_message": "string",
"sub_return_code": 0,
"sub_return_message": "string"
}