Idempotency-Key request header to detect duplicate retries and replay the original result instead of creating a second operation.
Supported endpoints
Idempotency currently applies only toPOST endpoints under /v1/payments/*, including payment, recurring, and future-transaction POST operations.
POSTrequests: supportedGETrequests: ignoredPUTrequests: ignored
Request header
Send anIdempotency-Key header with any POST request you may need to retry.
Use a new key for each new operation. Reuse the same key only when retrying the exact same request body.
How it works
- Send a POST request with an
Idempotency-Key. - If the request completes with a non-
5xxresponse, SmartRetry stores the original HTTP status and response body for 24 hours. - If you retry with the same key and the same request body during that window, SmartRetry returns the original status and body instead of creating a second operation.
- If you retry with the same key but a different request body, SmartRetry returns
409 Conflict.
Replay preserves the original HTTP status. A repeated request can replay a prior
200, 400, 403, 404, or other cached non-5xx response. 5xx responses are not cached.Response headers
When a keyed POST request is stored or replayed from cache, SmartRetry returns these headers:Errors
Example
Best practices
- Generate a fresh
Idempotency-Keyfor every new POST operation. - Reuse the same key only when retrying the exact same request after a timeout, disconnect, or ambiguous client failure.
- Keep
merchant_transaction_idas your own business reference for reconciliation, not as the retry mechanism. - Log the
Idempotency-Keywith your outbound request and SmartRetry response to simplify incident tracing.