← Back to blog
Exports4 min read

Idempotent exports that never double‑bill

Use idempotency keys and retry-safe exports to avoid duplicates across bulk runs and webhooks.

Generate an idempotency key from user_id + provider + document_id. Store it on the export record.

On retry, reuse the same key and update the existing export record instead of creating a new bill.

Verify exports by fetching the bill by ID after creation. Mark verified and surface the link.

If the API returns validation errors, skip retries and send the export to Needs Attention.

Want implementation details? See the API docs.