LatticeStripe.RetryStrategy.Default (LatticeStripe v0.2.0)

Copy Markdown View Source

Default retry strategy following Stripe SDK conventions.

Behavior:

  • Stripe-Should-Retry: true header forces retry regardless of status
  • Stripe-Should-Retry: false header forces stop regardless of status
  • Without header: retry on 429, 500+, and connection errors; stop on other 4xx
  • 409 (idempotency conflict) is never retried
  • Retry-After header respected on 429, capped at 5 seconds
  • Exponential backoff: min(500 * 2^(attempt-1), 5000) with 50-100% jitter