/api/v1/orders/:order_id/cancel write:order Cancels an unpaid order (PENDING_PAYMENT) and releases its card(s) so they can be re-quoted. It also cancels a committed order that is on hold (see Hold order), whoever placed the hold: its cards go back to your inventory, OFFCHAIN, and nothing ships. A committed order that is not on hold cannot be cancelled: hold it first, then cancel it. Idempotent: cancelling an already-CANCELLED order also returns 200. Fulfilled or returned orders are rejected (409). The path takes the integer order_id. A reference works only on an order that has one (quotes created from 2026-10-07 do not: an order’s reference is assigned at commit).
POST /api/v1/orders/0/cancel write These inputs are shared across all docs pages, so an id entered here carries over.
Not run yet. Press Run to make a live call against https://service.rip.fun (through this demo's server-side proxy; the API key never reaches the browser).
curl -X POST 'https://service.rip.fun/api/v1/orders/0/cancel' \ -H 'X-API-Key: rip_…'
data)| Field | Description |
|---|---|
(serialized order) | The order with status CANCELLED (same shape as GET /orders/:order_id). A held order loses its hold field |
| Status | Code | When |
|---|---|---|
| 403 | Insufficient permissions | key is tenant-scoped but carries neither write:order nor admin — a read-only key can list and fetch orders but not open, commit or cancel one |
| 400 | invalid order_id | order_id is neither a positive integer nor a reference like 101326AA0042 |
| 404 | order not found | order not part of your account |
| 409 | cannot be cancelled | order is neither PENDING_PAYMENT nor on hold. A PENDING order says to hold it first. Carries data: {order_id, status} |
| 409 | PICK_STARTED | a held order: a card from it was picked while it was on hold. Contact us |
| 409 | LABEL_BOUGHT | a held order that has a shipping label, bought or being bought. Contact us to void the label. Release hold still works |
| 409 | ORDER_CHANGED | a held order changed while it was cancelled. Try again |
See Errors for the response envelope and the full code list.