The same key twice means one record, not two charges
Usage records
Recording usage takes a requiredidempotency_key. Send the same key twice and
the second call does not create a second record.
Billing periods
A billing period can only ever open one invoice. That rule lives in the database, not in a worker, so several workers scanning at once divide the work rather than duplicating it. If your own scheduler asks Reclack to bill the same period twice, the second attempt does not produce a second invoice.Payments
A payment is addressed by its reference, and confirming it is a read of what the chain already shows. The hosted checkout polls that endpoint while a transaction gains confirmations, and polling it more often does not submit anything twice. Collections are submitted against the authorization your customer signed, and a collection can never exceed the cap in that authorization. If a transaction has already settled for a period, a retry reconciles against it rather than sending a second payment.What is not idempotent yet
Writes such as creating a product, a customer or a checkout session do not accept anIdempotency-Key header today. If your service retries them, guard
with your own check first.
A short pattern that works well:
external_id on a customer, and metadata on most other objects, exist partly
for this. Put your own id on the object when you create it, and a retry can
find it instead of making a second one.
