Demo, all content is generated
Question

Customer portal button crashes: "No configuration provided and your test mode default configuration has not been created"

Solved · 416 views · asked by tomvibes · edited

Added a "Manage subscription" button with Bolt. It calls stripe.billingPortal.sessions.create({ customer, return_url }). Getting:

You can't create a portal session in test mode until you save your customer portal settings in test mode at https://dashboard.stripe.com/test/settings/billing/portal.

Do I need to write a configuration object in code? Bolt tried to create one with the API and it got messy.

What I’ve tried

Bolt generated a billingPortal.configurations.create call with a ton of options, it errors on features.subscription_update.products and I don't know what to put there.

Comment
had this exact error last week frankie_r · edited

3 answers

Marked as helpful by the asker
nightshiftbuilder · edited

No code needed. Open the link from the error (Settings > Billing > Customer portal, test mode), look through the options and hit Save. That creates the default configuration and your existing call starts working. Delete the configurations.create code Bolt added.

You have to do this once more in live mode before launch.

Comment
lol it was literally one Save button. Works. thanks tomvibes · edited
tobiasw · edited

Only reach for configurations.create if you need different portal setups per plan. For a normal app the dashboard default is fine. If you enable plan switching in the portal, that's where you pick which products customers may switch between.

Comment
sarah_k_dev · edited

While you're on that settings page: enable payment method updates and invoice history. Those are the two things users actually open the portal for.

Comment