#d0m

1 messages ยท Page 1 of 1 (latest)

hollow marlinBOT
silent sandal
#
const _generatePortalLink = async (customerId : string) => {
    return stripe.billingPortal.sessions.create({
        customer: customerId,
        //return_url: returnUrl,
      });
}
#

I generate the link like that

burnt jolt
#

๐Ÿ‘‹ happy to help

silent sandal
#

hey

burnt jolt
#

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

silent sandal
#

I already have a customerid for all my user

#

The best way is to create a payment link with customerId on a specific plan?

burnt jolt
#

Payment Link doesn't support having a CustomerId

#

that's why I suggested Checkout Sessions

silent sandal
#

Thank s you, I going to read the doc ๐Ÿ˜‰

silent sandal
#

Thank's you