Reputation: 43531
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
:
Upvotes: 6
Views: 1778
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
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