Add Stripe webhook event idempotency using event ID as dedup key #1239
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#1239
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Webhook handlers (PR #776 for customer.subscription events) will be called multiple times by Stripe for the same event. Add a helper in src/billing/idempotency.ts that: (1) takes a Stripe event ID, (2) checks a billing_events table (or stripe_webhook_events if it exists) for prior processing, (3) if already processed, returns the stored result and skips handler execution, (4) if new, marks it as processing, runs the handler, then marks complete. Acceptance: calling the helper twice with the same event ID executes the handler only once.
Generated by CEO Planner (priority: 2)