Skip to content

Subscribe button routes through one-time checkout — subscription path unreachable from UI #166

Description

@TortoiseWolfe

Found during the subscription-lifecycle live-acceptance session (roadmap #115 Session +1). Same class as the PayPal DEMO-stub (#160): server built, client stub.

The bug

The "Subscribe $9.99/month" button (src/app/payment-demo/page.tsx:191-201, type="recurring") routes through usePaymentButton.initiatePayment, which always calls the one-time createStripeCheckout(intent.id) path (src/hooks/usePaymentButton.ts:162). Clicking Subscribe creates a one-time $9.99 charge, never a subscription.

  • createSubscriptionCheckout(priceId, customerEmail) (src/lib/payments/stripe.ts:151-187) exists, is clover-fixed, and has zero callers.
  • create-stripe-subscription (deployed v8) has never been reachable from any UI.
  • Additionally, a type="recurring" button on the PayPal tab would silently create a one-time PayPal order via mountPayPalButtons (PayPal subscriptions are [Phase 0d] PayPal subscription: create-paypal-subscription (~2h) #104).

Fix (this session's PR)

  1. stripeConfig.subscriptionPriceId from NEXT_PUBLIC_STRIPE_PRICE_ID (the fn requires an operator-created Stripe Price ID).
  2. initiatePayment: stripe + recurringcreateSubscriptionCheckout; clear error if the price ID is unconfigured.
  3. mountPayPalButtons: guard recurring with a clear error referencing [Phase 0d] PayPal subscription: create-paypal-subscription (~2h) #104.
  4. Covering unit tests + live-acceptance E2E.

Part of the #100 epic; acceptance evidence will close #105.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggap-auditIdentified during 2026-04-25 planned-vs-shipped audit

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions