For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cancel an order

Cancel the order and optionally email the customer. Returns the updated order summary.

Cancel an order

post

Cancel the order and optionally email the customer. Returns the updated order summary.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
store_idstringRequired

The ID of the store that owns the order.

Example: store_01J8Z5F8W9K8M4A7B3C2D1E0FG
order_idstringRequired

The ID of the order to cancel.

Example: order_01J8Z5F8W9K8M4A7B3C2D1E0FG
Body
notify_customerbooleanOptional

Whether to email the customer about the cancellation. Defaults to true.

Example: true
Responses
200

Success 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?