#jabza
1 messages · Page 1 of 1 (latest)
Hi there
Billing Portal is enabled by default, yes. But it would just have the default config. You will want to pass a specific config if you want something different, or have your users set up their default config.
Just I was seeing an error when trying to create a billing portal (from the Platform, on behalf of the new Connected Account) that prevented my from getting a portal URL from the API
(this was in Test mode, if that has an effect)
Hmm do you have a request ID?
For that error I mean
My understanding is it should just work
StripeInvalidRequestError: 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.
req_oQ1Y5RKM2WWPbC
(I fixed the error by manually going into the Connected account and clicking 'create billing portal link') but ideally I wouldn't want to do that everytime someone signs up...
if that makes sense
Thanks, taking a look
thanks 🙂
Hmm okay looks like I'm wrong and we don't use the default config without you activating the link. Though I don't believe that should be the behavior so I'll file some feedback about that.
However, if you don't want to go into each Dashboard to enable this then you should actually pass a config that you create to your Customer Portal Session: https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-configuration
Then it should work without enabling the feature in the Dashboard to use the default
ahh gotchya
hmm
so my use case as a Platform is
the Connected Account's subscribers go to manage their subscription - I use stripe.billingPortal.sessions.create (using the Connected Account's acct_id) - to get the customer a portal URL
so it sounds like if I pass in the config, it shouldn't error on the first try anymore?
Thanks
Yep correct
I'd test it to make sure
But if you pass a config that you create on the Connected Account (using https://stripe.com/docs/api/customer_portal/configurations/create) to the Portal Session creation then it should just work