Add webhook event ID deduplication table and check-before-process logic #820
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#820
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?
Create migration for processed_webhook_events table (event_id TEXT PRIMARY KEY, processed_at TIMESTAMP DEFAULT NOW()). In the Stripe webhook handler, check for existing event_id before processing. Skip and return 200 if already processed. Insert event_id after successful processing in the same transaction as the subscription update. This prevents double subscription activations on Stripe retries. Add test: send same event twice, confirm handler returns 200 both times but only processes once.
Generated by CEO Planner (priority: 3)