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
externalRequestId(a UUID) and returns it to you, so that you can use it in future queries and reconciliation.
debtId is debt_ + externalRequestId.
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.Subscriptions
The key of a subscription isexternalSubscriptionId, which goes in the body and is unique per organization. Repeating it returns 409 RESOURCE_CONFLICT. POST /subscriptions does not use the Idempotency-Key header.
The debts generated by the subscription use externalRequestId = <externalSubscriptionId>-cycle-<n>, with n starting at 0, so you can find the first cycle’s debt with GET /debts?externalRequestId=SUB-2026-007-cycle-0. See Subscriptions.
Payment links
The key of a payment link isexternalPaymentLinkId:
- If you send it in the body, that value is used and the
Idempotency-Keyheader is ignored. - If you do not send it but you send the
Idempotency-Keyheader, the header value is used asexternalPaymentLinkId. - If you send neither, the link has no external key:
externalPaymentLinkIdisnulland each request creates a new link.
externalPaymentLinkId returns 409 RESOURCE_CONFLICT and no debt is created. See Payment links.
Idempotency applies per organization. The same key in two distinct organizations does not interfere with each other.

