Shamoon
Shamoon

Reputation: 43531

How can I let my customer select a plan with the Stripe Billing Portal?

enter image description here

This is what my customer sees when I redirect to the portal. But I want them to be able to select a plan and add a payment method themselves.

This is how I'm getting the URL:

  const session = await stripe.billingPortal.sessions.create({
    customer: req.body.stripeCustomerId,
    return_url: 'http://localhost:3000/app',
  });

I want the user to be able to select a plan, which I have as a Product:

enter image description here

Upvotes: 6

Views: 1778

Answers (2)

juliushuck
juliushuck

Reputation: 1684

You can also use Stripe Pricing Table instead of only Stripe Checkout

See: https://stripe.com/docs/no-code/pricing-table

Upvotes: 0

hmunoz
hmunoz

Reputation: 3341

From what I know, the BillingPortal does not support subscribing to new Prices/Plans. It only supports switching Prices/Plans (e.g. downgrading or upgrading) or updating quantities purchased: https://stripe.com/docs/billing/subscriptions/customer-portal

You would have to use Stripe Checkout to start your user on a Subscription, and then leverage BillingPortal to allow them to switch Prices.

Upvotes: 6

Related Questions