Safe retry behavior for POST payment requests using the Idempotency-Key header.
Use idempotency to safely retry a POST payment request when your client is unsure whether the first attempt completed. SmartRetry uses the Idempotency-Key request header to detect duplicate retries and replay the original result instead of creating a second operation.
If the request completes with a non-5xx response, 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.
The header is too long or contains unsupported characters.
409
IDEMPOTENCY_CONFLICT
The same key was reused with a different request body.
503
RESOURCE_LOCKED
Another request with the same key is still in flight and SmartRetry could not obtain the cached result before the wait timeout.
If a duplicate request arrives while the original request is still running, SmartRetry waits briefly for the original result before returning 503 Resource Locked. The current maximum wait is 10 seconds.