Authentication
Idempotency
Make invoice creation safe to retry, so a dropped connection never creates a duplicate invoice.
The Idempotency-Key header
Send an Idempotency-Key header on POST /api/invoices: any unique string up to 255 characters, such as a UUID per order-attempt.
bash
Idempotency-Key: 5f0c7e2a-1c3d-4a9b-8e7f-2b6a1d0c9e88
A retry with the same key returns the original invoice instead of creating a duplicate. Keys are scoped to your store and map permanently to their invoice. Use a fresh key for each distinct attempt.
Send an idempotency key on every invoice creation to make network retries safe by default.