Idempotency

Networks fail. When a call times out you don't know whether it worked, so retry it, and we make sure it only happens once:

  • POST /v1/payments needs an Idempotency-Key header (up to 120 characters; your order ID works). The same key and body returns the first answer. The same key with a different body is refused with idempotency_conflict.
  • POST /v1/charges and POST /v1/checkout-sessions use your reference: the same reference and amount returns the existing charge. The same reference with a different amount is refused with reference_used.