1 2 3 4 5 6 7 8 9 10 11 12import { event, stripe } from '#src/utils'; export const stripePortal = async () => { const session = await stripe.billingPortal.sessions.create({ customer: event.claims.profile, return_url: `https://${process.env.URL}`, }); return { url: session.url, }; }