Skip to main content
Network calls fail, time out, and get retried. To make ordering safe, Kalixo uses your externalOrderCode as an idempotency key.

How it works

  • externalOrderCode must be unique per order within your account.
  • If you POST /orders again with an externalOrderCode that already exists, Kalixo does not create a second order. It returns 202 Accepted with the existing order: the same orderId, its current status and a fresh wallet snapshot.
  • This means you can safely retry a request whose response you never received.
The replay response never contains codes. Fetch them with GET /orders/{externalOrderCode}, as for any order.
Generate a stable externalOrderCode before you send the request (for example, your own order reference), so a retry uses the exact same code.

Handling 409 Conflict

A 409 means another request with the same externalOrderCode was being placed at that moment. The order exists. Do not place it again with a new code: fetch it with GET /orders/{externalOrderCode} and continue polling.

Example

The first call creates the order; an identical retry returns the same orderId.
Kalixo matches on externalOrderCode only. Reusing a code with a different payload returns the original order unchanged, without an error. Always use a new code for a genuinely new order.