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

Viewed 312

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

1 Answers

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.

Related