#d0m
1 messages ยท Page 1 of 1 (latest)
const _generatePortalLink = async (customerId : string) => {
return stripe.billingPortal.sessions.create({
customer: customerId,
//return_url: returnUrl,
});
}
I generate the link like that
๐ happy to help
hey
the Customer Portal can't create new subscriptions
you need to first create a Checkout Session to create the subscription
and then use the Customer Portal to give your customer the possibility of managing their subscription/payment methods
I already have a customerid for all my user
The best way is to create a payment link with customerId on a specific plan?
Payment Link doesn't support having a CustomerId
that's why I suggested Checkout Sessions
Thank s you, I going to read the doc ๐
Thank's you