Idempotency-Key to prevent duplicate charges or refunds when you retry a request. Reuse the same key and request body for each retry.
Supported endpoints
- Create a payment with
POST /payments. - Refund a payment with
POST /payments/{id}/refund. - Void a payment with
POST /payments/{id}/void.
Sending the header
Pass a unique string (max 255 characters) in theIdempotency-Key header. Use a UUID generated with $(uuidgen) in shell or crypto.randomUUID() in Node. Keys are scoped to your API account.
Replay behaviour
If you send the same key with the same request body, the API returns the original response without charging or refunding again, with the header:4xx) are replayed too.
Idempotency conflicts
After a
5xx on create payment, the key stays reserved so that a retry cannot charge the card twice. A retry returns IDEMPOTENCY_RECONCILIATION_REQUIRED. After a 5xx on refund or void, the key is released, so you can retry the operation with the same key.