Stripe Customer Portal docs tell us to use this:
app.post('/create-customer-portal-session', async (req, res) => {
// Authenticate your user.
const session = await stripe.billingPortal.sessions.create({
customer: '{{CUSTOMER_ID}}',
return_url: 'https://www.seedsgives.com/thanks-for-giving',
});
res.redirect(session.url);
});
....but I need to first find a way to authenticate our customers using the customer ID already stored within our Stripe account, or this doesn't work.
I assume I can pull this info using the Stripe API, but am at a loss as to how to do so. Can anyone help?