https://shopify.com/admin/api/2020-04/orders/{order_id}/cancel.jsonhttps://shopify.dev/docs/admin-api/rest/reference/orders/order#cancel-2020-04
order_id
The amount to refund. If set, Shopify attempts to void or refund the payment, depending on its status. Shopify refunds through a manual gateway in cases where the original transaction was not made in Shopify. Refunds through a manual gateway are recorded as a refund on Shopify, but the customer is not refunded.
The currency of the refund that's issued when the order is canceled. Required for multi-currency orders whenever the amount property is provided.
Whether to restock refunded items back to your store's inventory. (default: false)
The reason for the order cancellation. Valid values: customer, inventory, fraud, declined, and other.) (default: other)
Whether to send an email to the customer notifying them of the cancellation. (default: false)
The refund transactions to perform. Required for some more complex refund situations. For more information, see the Refund API.
{
"success": true,
"data": {
"id": "abc123",
"created_at": "2025-01-01T00:00:00Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}1curl --request POST \2 --url 'https://shopify.com/admin/api/2020-04/orders/{order_id}/cancel.json' \3 --header 'accept: application/json' \4 --header 'content-type: application/json'1{2 "success": true,3 "data": {4 "id": "abc123",5 "created_at": "2025-01-01T00:00:00Z"6 }7}https://shopify.com/admin/api/2020-04/orders/{order_id}/cancel.jsonhttps://shopify.dev/docs/admin-api/rest/reference/orders/order#cancel-2020-04
order_id
The amount to refund. If set, Shopify attempts to void or refund the payment, depending on its status. Shopify refunds through a manual gateway in cases where the original transaction was not made in Shopify. Refunds through a manual gateway are recorded as a refund on Shopify, but the customer is not refunded.
The currency of the refund that's issued when the order is canceled. Required for multi-currency orders whenever the amount property is provided.
Whether to restock refunded items back to your store's inventory. (default: false)
The reason for the order cancellation. Valid values: customer, inventory, fraud, declined, and other.) (default: other)
Whether to send an email to the customer notifying them of the cancellation. (default: false)
The refund transactions to perform. Required for some more complex refund situations. For more information, see the Refund API.
{
"success": true,
"data": {
"id": "abc123",
"created_at": "2025-01-01T00:00:00Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}1curl --request POST \2 --url 'https://shopify.com/admin/api/2020-04/orders/{order_id}/cancel.json' \3 --header 'accept: application/json' \4 --header 'content-type: application/json'1{2 "success": true,3 "data": {4 "id": "abc123",5 "created_at": "2025-01-01T00:00:00Z"6 }7}