Skip to main content
Reliable integrations assume that the client might not receive the response even when the server did the work.

Retry matrix

Recover after an unknown result

If a payment request times out, retrieve the resource instead of creating the payment again. Store your own order ID so you can match the API result to the original request:
  • Store client_reference_id on checkout sessions.
  • Store metadata.order_id or similar on checkout sessions, payment links, refunds, and customers.

Confirm payment on your server

Success redirects can be lost, forged, duplicated, or opened in another tab. Always verify server-side state before fulfillment.

Reuse keys only for retries

An idempotency key should represent one business operation, not one endpoint forever. Good:
Bad: