Add Stripe webhook retry mechanism with dead-letter logging #1399

Open
opened 2026-04-13 17:12:53 -04:00 by pook · 0 comments
Owner

Implement retry logic for failed Stripe webhook event processing. On transient failure (network error, database timeout, Stripe API 5xx), retry with exponential backoff up to 3 times (1s, 2s, 4s delays). After max retries, insert the full event into a webhook_dead_letters table with columns: id, event_id, event_type, payload (jsonb), error_message, created_at. Add integration test: mock Stripe event, force 2 transient failures then succeed on 3rd try — verify event processed. Add test: force 3 failures, verify dead-letter row created. This is distinct from #1380 (deduplication) and complements it.


Generated by CEO Planner (priority: 3)

Implement retry logic for failed Stripe webhook event processing. On transient failure (network error, database timeout, Stripe API 5xx), retry with exponential backoff up to 3 times (1s, 2s, 4s delays). After max retries, insert the full event into a webhook_dead_letters table with columns: id, event_id, event_type, payload (jsonb), error_message, created_at. Add integration test: mock Stripe event, force 2 transient failures then succeed on 3rd try — verify event processed. Add test: force 3 failures, verify dead-letter row created. This is distinct from #1380 (deduplication) and complements it. --- *Generated by CEO Planner (priority: 3)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#1399
No description provided.