BillyDocumentation

Cancel an order

Cancels an order, voids its tickets and cancels its products, if any. The order status is updated synchronously (the response reflects the real cancelled state), while voiding the tickets and cancelling the products are processed asynchronously — poll GET /tickets for the final state. This endpoint never refunds the order.

Preview release

This operation is only available on the preview release target — send Billy-API-Version: preview to reach it. Preview has no stability promise: its routes and payloads can change without notice, so pin a dated release before you depend on one. The playground below sends a real POST request to the live API with your own key, and will create or modify actual data.
POST
/v1/orders/{order_id}/cancel

Cancels an order, voids its tickets and cancels its products, if any. The order status is updated synchronously (the response reflects the real cancelled state), while voiding the tickets and cancelling the products are processed asynchronously — poll GET /tickets for the final state. This endpoint never refunds the order.

Authorization

HTTPBearer
AuthorizationBearer <token>

API key authentication. Format: Bearer billy:o:<organization_id>:<api_key>

Example: Bearer billy:o:yyyyyyyyyyyyyyyy:xxxxxxxxxxxxxxxxx

In: header

Path Parameters

order_id*Order Id

Header Parameters

Billy-API-Version*string

Requested API version. Current context: preview.

Default"preview"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body for POST /v1/orders/{order_id}/cancel.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/orders/string/cancel" \  -H "Billy-API-Version: preview" \  -H "Content-Type: application/json" \  -d '{    "reason": "other"  }'
{  "orderId": "string",  "orderNumber": "string",  "basketId": "string",  "salesChannelId": "string",  "salesChannelName": "string",  "status": "string",  "customer": {    "customerId": "string",    "email": "string",    "firstName": "string",    "lastName": "string"  },  "billingAddress": {    "type": "personal",    "firstName": "string",    "lastName": "string",    "companyName": "string",    "vatNumber": "string",    "phone": "string",    "addressLine1": "string",    "addressLine2": "string",    "city": "string",    "postalCode": "string",    "countryCode": "string"  },  "currency": "AED",  "totalPrice": 0,  "totalPaidPrice": 0,  "subtotalPrice": 0,  "subtotalPaidPrice": 0,  "discountAmount": 0,  "discountCode": "string",  "paymentProvider": "string",  "paymentMethod": "string",  "serviceFees": 0,  "deliveryFees": 0,  "totalVatAmount": 0,  "delivery": {    "type": "home_delivery",    "carrierId": "string",    "homeDeliveryAddress": {      "type": "personal",      "firstName": "string",      "lastName": "string",      "companyName": "string",      "vatNumber": "string",      "phone": "string",      "addressLine1": "string",      "addressLine2": "string",      "city": "string",      "postalCode": "string",      "countryCode": "string"    },    "pickupPoint": {      "pickupPointId": "string",      "pickupPointName": "string",      "pickupPointAddress": {        "type": "personal",        "firstName": "string",        "lastName": "string",        "companyName": "string",        "vatNumber": "string",        "phone": "string",        "addressLine1": "string",        "addressLine2": "string",        "city": "string",        "postalCode": "string",        "countryCode": "string"      }    }  },  "placedItems": [    {      "offerId": "string",      "offerName": "string",      "inventoryId": "string",      "quantity": 0,      "unitPrice": 0,      "unitPaidPrice": 0,      "unitDiscountAmount": 0,      "discountCode": "string",      "priceLabel": "string",      "offerType": "string",      "eventId": "string",      "sessionId": "string",      "unitVatAmount": 0    }  ],  "optIns": [    {      "name": "string",      "accepted": true    }  ],  "createdAt": "string",  "fulfilledAt": "string",  "cancelledAt": "string",  "updatedAt": "string",  "paymentStatus": "string",  "refundedAmount": 0,  "addOns": [    {      "category": "INSURANCE",      "serviceId": "string",      "serviceName": "string",      "addOnPaidPrice": 0    }  ],  "ticketsProtected": false}