#Maurdekye
1 messages · Page 1 of 1 (latest)
here is a sample of the nodejs code i use to create the billing portal link:
const session = await stripe.billingPortal.sessions.create({
customer: profile.stripe_id,
return_url: "https://website.com/"
});
return session.url;```
Do you have a Request ID for both the creation of the Billing Portal and the creation of the Billing Portal configuration?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
give me a minute while i get a hold of that
in the meantime, here's the full session object that the api call returns, if it's at all helpful:
{
id: 'bps_1N5xTKDTTOdeFUQRYJr3bc97',
object: 'billing_portal.session',
configuration: 'bpc_1N4UohDTTOdeFUQRrpfbo3NR',
created: 1683665362,
customer: 'cus_NrgckduN1YAedh',
flow: null,
livemode: false,
locale: null,
on_behalf_of: null,
return_url: 'https://website.com/',
url: 'https://billing.stripe.com/p/session/test_YWNjdF8xTWUyMlNEVFRPZGVGVVFSLF9OcmdyZ0gyOUh3aFFISEhHUVdzTDlzYm55Tnh1cGw201001wonkraX'
}```
this also seems relevant: evt_1N5xTKDTTOdeFUQRfyIiOm6b
i wasn't able to find an id with the prefix req_ associated with the api call unfortunately
Which subscription management capabilities are you looking for specifically?
the ability to purchase upgrade, downgrade, or cancel subscriptions
Which ones aren't showing?
here, i can show you a screenshot, if you'll just give me a moment
It's all good. I found it
It looks like your customer doesn't have an active subscription, so those option aren't going to show
You have to give that Customer a subscription to update in order for those options to appear
oh, i see
how can i do that? is it possible for a user to review and purchase a new subscription within the billing portal?
No. You have to give them an active subscription a different way. There are a lot of options for doing that, but if you're looking for a low-code option, you might checkout the Pricing Table: https://stripe.com/docs/payments/checkout/pricing-table