From 570b11ef2a191563f52a69df708e0e9564e2cb96 Mon Sep 17 00:00:00 2001 From: Josh Creek <8179928+jcreek@users.noreply.github.com> Date: Tue, 22 Oct 2024 19:14:16 +0100 Subject: [PATCH] fix(#45): Remove customer creation from subscription checkout mode --- src/routes/api/subscribe/+server.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/routes/api/subscribe/+server.ts b/src/routes/api/subscribe/+server.ts index f03b008..403f5e4 100644 --- a/src/routes/api/subscribe/+server.ts +++ b/src/routes/api/subscribe/+server.ts @@ -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