Gyvar docs

Cancel an order

Cancels an `open` order and frees its `reference`. Money that still arrives is credited to you and shown in the dashboard. Needs the `receive` capability.

POST
/checkout/orders/{id}/cancel

Authorization

KeyID Timestamp Nonce Signature
X-Gyvar-Key<token>

Your key id, gyv_k_live_... or gyv_k_sandbox_....

In: header

X-Gyvar-Timestamp<token>

Unix seconds. Must be within 5 minutes of our clock.

In: header

X-Gyvar-Nonce<token>

A unique value per request. Replays are rejected.

In: header

X-Gyvar-Signature<token>

Ed25519 signature over the canonical string. See the Signing guide.

In: header

Path Parameters

id*string
Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/checkout/orders/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel"
{  "data": {    "id": "7b1f9a2c-4e5d-4a8b-9c3f-2d6e1a4b7c90",    "status": "cancelled",    "kind": "checkout",    "reference": "order_1001",    "description": "Order #1001 at Kente & Co",    "amount": "125.50",    "amount_minor": "12550",    "currency": "GHS",    "currency_decimals": 2,    "late": false,    "url": "https://pay.gyvar.com/chk_live_7b1f9a2c-4e5d-4a8b-9c3f-2d6e1a4b7c90",    "success_url": "https://shop.example.com/checkout/thanks",    "cancel_url": "https://shop.example.com/cart",    "metadata": {      "order_id": "1001"    },    "expires_at": "2026-09-01T11:04:11Z",    "created_at": "2026-09-01T10:04:11Z"  }}