#sive_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1260763802350391346
đ Have more to share? Add details, code, screenshots, videos, etc. below.
HI there, so you only want your customer to only manage payment methods in customer portal page?
This button produces this link where you can manage just a single subscription
the customer portal manages the entire account.
@inner swan Currently this is how i create the customer portal session
async function createCustomerPortalSession(customerId) {
try {
const session = await stripe.billingPortal.sessions.create({
customer: customerId,
return_url: 'http://anchored.host/billing/subscriptions',
});
return session.url;
} catch (error) {
console.error('Error creating customer portal session:', error);
throw error;
}
}
Can you tell me what you want to achieve with customer portal?
I dont want to use customer portal, I want the individual subscription management portal referenced in the first two images but I dont see any API routes to generate the link.
Customer portal is my band aid on the issue
I want to generate a URL like above to update_payment_method_link
OK, you can achieve the same with customer portal by creating a portal configuraiton that has payment_method_update enabled only https://docs.stripe.com/api/customer_portal/configurations/create#create_portal_configuration-features-payment_method_update
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It needs to reference a single subscription and it doesnt appear be able to have a field for updating payment method for a single subscription.
No you can't limit a customer portal session to one subscription only.
Yes I dont want a customer portal, I want the alternative
How can I generate this link, thats not the customer portal, via the API
that link takes me to a page thats not the customer portal
This is a dashboard only feature, not availble through API.
Is there a page link I can generate that allows me to a add payment method only? Then I can create a form to change the payment method for the subscription on my frontend
I guess I can just create an empty checkout session