POST went through. Send an Idempotency-Key with it, and a retry with the same key cannot create twice.
- Use a key that comes from your own record, such as your invoice number, so a retry sends the same key. Up to 255 printable ASCII characters.
- The same key from your app within 24 hours answers the first result again, with the header
Idempotent-Replayed: true, and creates nothing. - Only successful answers are kept. If the first request was refused, fix it and send it again with the same key.
- The same key with a different body answers
422 idempotency_key_reused. - While the first request is still running, the same key answers
409 idempotency_in_progress: retry shortly.