fix(#45): Remove customer creation from subscription checkout mode

This commit is contained in:
Josh Creek
2024-10-22 19:14:16 +01:00
parent f3e6c236d5
commit 570b11ef2a
-4
View File
@@ -50,10 +50,6 @@ export const POST: RequestHandler = async ({ request, cookies, locals: { safeGet
if (stripeCustomerId) {
// If the user has a Stripe customer ID, attach it to the checkout session
stripeCheckoutSessionObject.customer = stripeCustomerId;
} else {
// If the user doesn't have a Stripe customer ID, create a new customer
stripeCheckoutSessionObject.customer_creation = 'always';
stripeCheckoutSessionObject.customer_email = userEmail;
}
// Create a subscription checkout session with Stripe