Cancel Order

To avoid business conflict, if the client cannot get successful payment result or any response from MugglePay, it should send a cancel request to MugglePay to cancel the failed order.

Use it when the order status is NEW.

It’s done by MugglePay payment page. ONLY use this if you want to build an in-house payment without redirecting.


Definition

POST https://api.mugglepay.com/v1/orders/:order_id/cancel

Body Params

Param Type Required Description
order_id string Yes MugglePay order ID. It's provided in the response of Create Order.

Example

curl -X POST \
  https://api.mugglepay.com/v1/orders/8cbe9c00-7b0d-4b03-816f-e88a3c6bfa5c \
  -H 'token: API_TOKEN_GET_FROM_ADMIN_PORTAL'