Skip to main content
Every v2 order is asynchronous. You place an order, receive an orderId immediately, then poll until the codes are ready.

Statuses

status
The order was accepted and is being fulfilled. Poll again after estimatedReadyAt.
status
All codes were delivered. The response includes products[].codes.
status
Some - but not all - codes were delivered. The response includes delivered, total, and products[].codes for every code that was delivered (fewer than quantity on each line). See Partial deliveries below.
status
No codes were delivered. The response includes a reason (Order could not be fulfilled).
Codes are returned when status is completed or partially_completed. While processing, you receive {"status": "processing", "message": "Order is still processing"} with no codes.
Every order response (place and poll) also includes a wallet snapshot with your current balances and low-balance flag.

The flow

1

Place the order

POST /orders returns 202 Accepted with orderId, status: "processing", estimatedReadyAt, and wallet.
2

Wait for the estimate

estimatedReadyAt tells you roughly when codes will be ready. It scales with the order size - small orders are near-instant; large orders take longer.
3

Poll the order

GET /orders/{reference} by orderId or externalOrderCode. Repeat until you get a terminal status (completed, partially_completed, or failed).

Order pricing

Each line in orderProducts carries a unit price in minor units (validated against the catalog).

Multi-line example

Two fixed-price products totalling 15000 minor units (GBP 100.00 + GBP 50.00):

Regional products

A regional product can be sold in several countries. The catalog returns one row per country, all with the same productCode, and each row lists every market in availableCountries. Tell Kalixo which market to fulfil with country on the order line:

Redemption codes

When an order completes - or partially completes - each line includes a codes array with one object per delivered unit:
Quantity 2 with two successful deliveries yields two { code } entries. On a partially_completed order, codes.length may be less than quantity for a line.

Large orders

Use the same POST /orders endpoint for any quantity. The response includes an estimatedReadyAt timestamp that scales with the order size - larger orders may take longer to complete. Poll GET /orders/{reference} until you reach a terminal status. While the order is still processing, you’ll see "message": "Order is still processing". When completed or partially_completed, the response includes delivered codes in products[].codes.

Polling cadence

Poll at or after estimatedReadyAt, then every minute or so. Avoid tight polling loops.

Idempotency

Re-submitting the same externalOrderCode returns 202 with the existing order - never a duplicate.

Partial deliveries

If you receive partially_completed:
  1. Save the codes in products[].codes - these are the units that were delivered.
  2. Compare delivered and total, and each line’s codes.length vs quantity, to see what is still outstanding.
  3. Do not place a new order for the missing quantity - billing and idempotency risks apply.
  4. Contact support at [email protected] with your orderId and externalOrderCode for the remaining units.
Example - 3 of 5 codes delivered:

Polling example

The example waits until estimatedReadyAt, then polls once a minute. It retries rate limits, 5xx responses and network errors with backoff, and gives up after a maximum wait. Other 4xx responses are not retried: they need a fix on your side.
Node
Choose the maximum wait from the order size: estimatedReadyAt is about 5 minutes after placement for up to 50 codes, 30 minutes for up to 500, and 60 minutes above that. If an order is still processing well past its estimate, contact [email protected] with the orderId.