Implement idempotency

DocsLimited

Last updated: Aug 26th, 1:44am

To prevent duplicate captures or order creation in failure scenarios, implement idempotency:

  • Set a unique PayPal-Request-Id header for each API call.
  • Reuse the same ID when retrying after network issues or 5xx server errors.
  • If a duplicate request is made with the same ID, PayPal returns the existing result instead of processing it again.

For more information, see PayPal-Request-Id.