Fix free tier checkout and Stripe duplicate customers #10

Merged
will.anderson merged 1 commits from fix/have-curl-define into stage 2026-05-07 06:01:05 +00:00
Owner

Free tier: no card ever shown, success panel after auth, /api/payment-intent returns early. Stripe dedup: Stripe init deferred until after auth so email is known, /api/payment-intent finds-or-creates customer by email before creating any intent.

Free tier: no card ever shown, success panel after auth, /api/payment-intent returns early. Stripe dedup: Stripe init deferred until after auth so email is known, /api/payment-intent finds-or-creates customer by email before creating any intent.
will.anderson added 1 commit 2026-05-07 06:00:58 +00:00
Free tier:
- checkout-stripe.el bails out immediately for plan=free (no Stripe init)
- checkout-auth.el skips payment section reveal and initStripe for free plan
- checkout-free.el shows #free-success panel after auth (no card ever shown)
- /api/payment-intent returns early for free plan — no Stripe call

Stripe dedup (all paid plans):
- Stripe init now deferred to window.initStripe(email, name), called by
  checkout-auth.el after sign-in — email is known before intent is created
- /api/payment-intent finds-or-creates Stripe Customer by email before
  creating the PaymentIntent/SetupIntent and attaches customer upfront
- Eliminates the window between intent creation and /api/link-customer
  that was producing duplicate guest customers
will.anderson added 1 commit 2026-05-07 06:00:58 +00:00
Free tier:
- checkout-stripe.el bails out immediately for plan=free (no Stripe init)
- checkout-auth.el skips payment section reveal and initStripe for free plan
- checkout-free.el shows #free-success panel after auth (no card ever shown)
- /api/payment-intent returns early for free plan — no Stripe call

Stripe dedup (all paid plans):
- Stripe init now deferred to window.initStripe(email, name), called by
  checkout-auth.el after sign-in — email is known before intent is created
- /api/payment-intent finds-or-creates Stripe Customer by email before
  creating the PaymentIntent/SetupIntent and attaches customer upfront
- Eliminates the window between intent creation and /api/link-customer
  that was producing duplicate guest customers
will.anderson merged commit e68de7892f into stage 2026-05-07 06:01:05 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/neuron-web#10