#sive_api

1 messages ¡ Page 1 of 1 (latest)

wintry forgeBOT
#

👋 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.

inner swan
#

HI there, so you only want your customer to only manage payment methods in customer portal page?

stoic arrow
#

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;
  }
}
inner swan
#

Can you tell me what you want to achieve with customer portal?

stoic arrow
#

Customer portal is my band aid on the issue

#

I want to generate a URL like above to update_payment_method_link

inner swan
stoic arrow
inner swan
#

No you can't limit a customer portal session to one subscription only.

stoic arrow
#

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

inner swan
#

This is a dashboard only feature, not availble through API.

stoic arrow
#

I guess I can just create an empty checkout session