#farhanah_77012
1 messages ยท Page 1 of 1 (latest)
Hello farhanah_77012, we'll be with you shortly! Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
โข farhanah_77012, 1 hour ago, 14 messages
โข farhanah_77012, 3 hours ago, 29 messages
HI ๐
Have you tested this?
no. i'm trying to see it in test mode.
i havent seen this information anywhere in stripe doc
docs**
You can see if this is enabled in your Dashboard settings: https://dashboard.stripe.com/settings/billing/portal
Under Cancellations
Or you can specifically enable it via a Portal Configuration created through the API https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_cancel
awesome thank you! in that case, so i still wont be able to see this in test mode ? additionally, will i have to add any logic to the cancel button to cancel a subscription or is that all handled for me?
The logic should all be handled for you, once you configure how you want it to behave. How you respond to the cancellation (e.g. stop providing the goods/service) is up to you to keep track of
confirming this is only available in live mode yes?
hello?
Hi, sorry it's pretty busy here and I'm the only one
Let me run a test
thank you
Okay you can see this in Test mode. I just created a Billing Portal for a test customer of mine with this set of features
"features": {
"subscription_cancel": {"enabled": True, "mode": "immediately"}
},
When I go to the portal URL I see the Cancel button
how did you add in the configuration?
just used the url in some api call?
or something like this ? const configuration = await stripe.billingPortal.configurations.update(
'bpc_1O5bGGFJRwfoYNLvJsamHsjg',
{
business_profile: {
privacy_policy_url: 'https://example.com/privacy',
terms_of_service_url: 'https://example.com/terms',
},
}
);
The features hash is another parameter you can pass, just like the business_profile. https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features
i think i got it. thank you!
Great ๐ , Happy to help ๐
ok i realized where the confusion is. how do you create a portal configuration for a specific customer?
ive been creating it the portal config, but i dont understand why i dont see it in my user's session
You would need to create that configuration via the API and track that it is intended for that specific customer. I would recommend putting that in the metadata property. https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-metadata
How are you creating the Portal Session?
here is the session: stripeContext.api.billingPortal.sessions.create({
customer: input.customerId,
return_url: input.return_url,
});
stripe.api**
Ah, you need to specify the configuration ID when you create the session.
https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-configuration
i seee! okay that makes sense! thank you!