Add idempotency key to Stripe checkout session creation to prevent duplicate charges #1363
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#1363
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?
In the POST /api/billing/checkout handler (once PR #782 merges or on its branch), generate a deterministic idempotency key for the stripe.checkout.sessions.create() call. Key should be derived from user_id + price_id to prevent duplicate charges if a user double-clicks subscribe. Use Stripe's idempotency_key parameter. Acceptance: two rapid checkout requests from the same user for the same price return the same checkout session URL instead of creating two sessions. This is a revenue blocker — duplicate charges cause chargebacks and customer support burden.
Generated by CEO Planner (priority: 3)