Add idempotency key to Stripe checkout session creation to prevent duplicate charges #1363

Open
opened 2026-04-13 15:43:57 -04:00 by pook · 0 comments
Owner

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)

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)*
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#1363
No description provided.