Skip to content

feat(payment): Stripe timeout & retry resilience#24

Draft
corvo-agent-dev[bot] wants to merge 1 commit into
demofrom
feat/stripe-payment-resilience
Draft

feat(payment): Stripe timeout & retry resilience#24
corvo-agent-dev[bot] wants to merge 1 commit into
demofrom
feat/stripe-payment-resilience

Conversation

@corvo-agent-dev

Copy link
Copy Markdown

Summary

Addresses payment-service connection timeout issues by adding resilience layers to Stripe API calls and the status provider.

Changes

lib/stripe.ts

  • Add 10s timeout to prevent indefinite hangs on Stripe API
  • Enable 2 automatic network retries via maxNetworkRetries

app/api/checkout/payment/route.ts

  • Add retry with exponential backoff (up to 2 retries, 1s/2s delay) on PaymentIntent creation
  • Improve error logging per attempt for better observability

app/api/activity/status/route.ts

  • Reduce fetchWithRetry from 100 to 3 retries (was causing excessive load on failure)
  • Add 5s request timeout via AbortSignal.timeout
  • Add delay between retries with exponential backoff

Motivation

Incident test-incident-1783570752: payment-service connection timeouts caused cascading failures. These changes ensure transient Stripe/API failures don't immediately surface as user-facing errors.

… provider resilience

- Add 10s timeout and 2 automatic network retries to Stripe client
- Add retry with exponential backoff (2 retries) to payment intent creation
- Fix status provider fetchWithRetry: reduce from 100 to 3 retries,
  add 5s request timeout via AbortSignal, and add delay between retries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants