The
reason field is optional (max 500 chars). When supplied, it surfaces verbatim as failureMessage on the order.failed webhook payload and on the polled GET /v2/orders/:id response, with no transformation.How to fail a conversion
Use theorders/:id/simulate/conversion-failed endpoint to force a conversion to a failed terminal state. The endpoint is timing-independent: call it at any point after order creation. If the conversion is already running, it is driven to failed immediately; otherwise the failure is armed and applied as soon as the conversion starts. The order is driven to failed and order.failed is emitted.
200 OK with the order at its current state. Returns 404 if the order is not found. Replays against an already-terminal order return 200 with the current resource (idempotent).
Rate-lock expiry SLA.
POST /v2/sandbox/orders/:id/simulate/rate-lock-expired returns 200 OK with the
order at its current state and the order reaches cancelled (expired) within
about 3 seconds via an immediate background sweep tick. No polling backoff
needed; no need to wait for the scheduled 30-second sweep.Webhook events
Conversion outcomes surface on the order’s webhook topic. There is no standalone conversion webhook.| Event | When it fires |
|---|---|
order.succeeded | The full order completed successfully (source settled, conversion ran, destination credited). Terminal. |
order.failed | The order failed. reasonCode (INSUFFICIENT_FUNDS / PROVIDER_UNAVAILABLE / PROVIDER_REJECTED / INTERNAL_ERROR / CANCELLED) names the failure category. Conversion failures surface here. |
order.cancelled | The order was cancelled before execution completed. cancellationReason is expired or client_cancelled. |
GET /v2/orders/:id to observe the current order state between terminal events.
See the Webhooks reference for full payload schemas.
Errors
Conversion failures produceorder.failed on the order. The payload carries reasonCode (INSUFFICIENT_FUNDS / PROVIDER_UNAVAILABLE / PROVIDER_REJECTED / INTERNAL_ERROR / CANCELLED) describing the failure category. See Error codes for the broader catalog used by other event types.