#The_Xs - Portal

1 messages · Page 1 of 1 (latest)

glossy ruin
#

Hello! What version of the Stripe Node library are you using?

wintry mason
#

stripe@8.211.0

#

hello!

#

const session = stripe.billingPortal.sessions.create({
//customer: 'cus_LNiUVElBoxPIPX',
customer: customerId,
return_url: 'http://localhost/',
});

#

console.log(chalk.green('Sessions: ' + session.url))

glossy ruin
#

That won't work as-is. stripe.billingPortal.sessions.create returns a Promise, and you're not waiting for the Promise to resolve before you hit the log statement.

wintry mason
#

oh right haha

#

I know what to do thank you!