API
Repeat protection
Send an Idempotency-Key so a retried call never buys a second check.
A call that buys something needs an Idempotency-Key header: any string from 1 to 255 characters that you generate once per call, such as a UUID. Today that is POST /v1/public/xray/finance/checks.
Idempotency-Key: 6f1c2b7e-3d4a-4b5c-8d9e-0a1b2c3d4e5f- Same key, same body, within 24 hours: you get that check back as it is now (
200, or202while it is still pending). Nothing runs again and nothing is charged again. - Same key, different body: refused with
409 idempotencyConflict. A retry must send exactly what the first call sent, the consent time included. - A call that ended in an error (any
4xxor5xx) is not remembered, so you can retry it with the same key once you've fixed the cause. One rare exception: a500that comes after the check was already charged keeps the key, so a retry with the same key returns that check instead of buying another.
Keys are scoped to the subaccount and forgotten after 24 hours. We keep a pointer to the check, never a copy of the response. Test keys skip repeat protection; see Testing.
Timeouts
A check waits for the credit provider, which can take up to 60 seconds. If your client times out first, retry with the same Idempotency-Key: you get the check that was already running or finished, not a new one.

