How it works
Send theIdempotency-Key header in your creation requests. It is optional, and your body stays clean: control information is not mixed with the resource data.
externalRequestId field, whether or not you sent the key:
- If you sent
Idempotency-Key:externalRequestIdis exactly the value you sent. - If you did not send it: the backend generates an
externalRequestIdand returns it to you, so that you can use it in future queries and reconciliation.
Permanent deduplication
TheexternalRequestId is a permanent unique key within your organization: there is a uniqueness constraint with no expiration (no TTL or time window).
409 RESOURCE_CONFLICT
Dual function: idempotency and reconciliation
TheexternalRequestId serves two roles at once:
Idempotency
Protects against duplicates when you retry a request that failed or expired.
Reconciliation
It is the external key of the debt. You can filter and list by it:
GET /debts?externalRequestId=....Where each key applies
Each creation resource has its own external key. Only debts use the header; subscriptions and payment links carry their key in the body.Idempotency applies per organization. The same
Idempotency-Key in two distinct organizations does not interfere with each other.
