Cancel an order
Cancel the order and optionally email the customer. Returns the updated order summary.
Cancel the order and optionally email the customer. Returns the updated order summary.
Authorizations
AuthorizationstringRequired
API Token authentication
Path parameters
store_idstringRequiredExample:
The ID of the store that owns the order.
store_01J8Z5F8W9K8M4A7B3C2D1E0FGorder_idstringRequiredExample:
The ID of the order to cancel.
order_01J8Z5F8W9K8M4A7B3C2D1E0FGBody
notify_customerbooleanOptionalExample:
Whether to email the customer about the cancellation. Defaults to true.
trueResponses
200
Success response
application/json
401
Unauthenticated response
application/json
422
Validation error response
application/json
500
Error response
application/json
post/api/ecommerce/v1/stores/{store_id}/orders/{order_id}/cancel
POST /api/ecommerce/v1/stores/{store_id}/orders/{order_id}/cancel HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 24
{
"notify_customer": true
}{
"data": {
"id": "order_01J8Z5F8W9K8M4A7B3C2D1E0FG",
"display_id": 1042,
"status": "pending",
"payment_status": "captured",
"fulfillment_status": "not_fulfilled",
"total": 4999,
"currency_code": "usd",
"customer_email": "buyer@example.com",
"item_count": 3,
"created_at": "2026-01-21T07:35:04.000000Z"
}
}Last updated
Was this helpful?