Idempotency keys ensure that retrying a failed request does not result in duplicate payments.
1. Generate a unique idempotency key for each payment intent -- a UUID v4 is recommended. Pass it in the Idempotency-Key header.
2. If you resend the exact same request with the same key within 24 hours, Verto returns the original response without re-processing.
💡 Tip: Store the idempotency key alongside the payment intent in your database before making the API call. |
3. If you change the request body but reuse the same key, Verto returns a 422 Idempotency conflict error.
⚠️ Warning: Idempotency keys expire after 24 hours. |
Related articles:
