Skip to main content
Idempotency ensures that when the same request is executed multiple times, the result is the same as executing it only once. In payment scenarios, this prevents duplicate charges caused by retries triggered by network timeouts.

Idempotency keys

Waffo uses paymentRequestId (payments) and subscriptionRequest (subscriptions) as idempotency keys.

Rules

  • Maximum length: 32 characters
  • Generate a unique value for each new request
  • Must be persisted to the database before sending the request
  • When retrying, reuse the original idempotency key; do not generate a new one

Pattern

Common mistakes