Cancel order

POST /api/v1/orders/:order_id/cancel tenant key

Cancels an unpaid order (PENDING_PAYMENT only) and releases its card(s) so they can be re-quoted. Idempotent: cancelling an already-CANCELLED order also returns 200. Committed, in-flight or fulfilled orders are rejected (409).

Try it POST /api/v1/orders/0/cancel write

These inputs are shared across all docs pages, so an id entered here carries over.

response

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 (tracks the inputs above)
curl -X POST 'https://service.rip.fun/api/v1/orders/0/cancel' \
  -H 'X-API-Key: rip_…'

Response fields (data)

FieldDescription
(serialized order)The order with status CANCELLED (same shape as GET /orders/:order_id)

Errors

StatusCodeWhen
400invalid order_idorder_id is not a positive integer
404order not foundorder not part of your account
409cannot be cancelledorder is not PENDING_PAYMENT — carries data: {order_id, status}

See Errors for the response envelope and the full code list.