Cancel Order
The cancel order API allows you to cancel an order that has not been paid or previously cancelled.
Note
- Applies to Payment_method=BANK_TRANSFER or Payment_method=NAPAS_BANK_TRANSFER
- Can only cancel when order_status is not CAPTURED and CANCELED
API Endpoint
POST
https://pgapi-sandbox.sepay.vn/v1/order/cancelAPI Request
order_invoice_numberstringrequired
Invoice number of the order to cancel
API Response
Success Response (200)
{
"message": "Đã hủy đơn hàng thành công"
}messagestring
Result message
Code Samples
>
>
>
>
>
curl --request POST \--url https://pgapi-sandbox.sepay.vn/v1/order/cancel \--header 'Authorization: Basic REPLACE_BASIC_AUTH' \--header 'content-type: application/json' \--data '{"order_invoice_number":"DH1757053857"}'