Skip to content

Get an order

Returns an order's status by your reference. It reads the status from the payment provider at the moment you ask, and if the order is paid but we have not told you yet, it sends the payment.paid callback right away. Use it when a callback is late, or before closing an unpaid order.

GET /api/v1/orders/{reference}

Request

GET /api/v1/orders/ORDER-8841
X-Api-Key: <your API key>

Encode the reference for the URL: ORDER/8841 → /api/v1/orders/ORDER%2F8841.

Response

{
  "ok": true,
  "orderId": "4f0c2a8e-…",
  "reference": "ORDER-8841",
  "status": "paid",
  "amount": "215.50",
  "amountMinor": 21550,
  "currency": "EUR",
  "paidAt": 1780000000,
  "stale": false,
  "attempts": [
    {
      "id": "ch_3Q…",
      "status": "failed",
      "failureCode": "card_declined",
      "declineCode": "insufficient_funds",
      "failureMessage": "Your card has insufficient funds.",
      "cardBrand": "visa",
      "cardLast4": "0341",
      "createdAt": 1779999900
    },
    {
      "id": "ch_3R…",
      "status": "succeeded",
      "failureCode": "",
      "declineCode": "",
      "failureMessage": "",
      "cardBrand": "visa",
      "cardLast4": "4242",
      "createdAt": 1779999990
    }
  ]
}
Field Description
status open (not paid yet) or paid. This is the order's status.
paidAt When it was paid, Unix time; 0 while open.
stale true when the payment provider could not be reached and the stored status is shown.
attempts Each card the customer tried, oldest first: succeeded, failed (with the reason) or pending. They can show up a few seconds after status: paid.

An order that is not yours, or does not exist, is 404 not_found.