diff --git a/supabase/functions/create-checkout/index.ts b/supabase/functions/create-checkout/index.ts index 931f829..e16900a 100644 --- a/supabase/functions/create-checkout/index.ts +++ b/supabase/functions/create-checkout/index.ts @@ -181,6 +181,16 @@ Deno.serve(async (req) => { }, } as any); + await insertOrder({ + method: "card", + b, + cleaned, + monthlyAmountOre, + stripeSessionId: session.id, + stripeSubscriptionId: null, + stripeCustomerId: customer.id, + }); + return new Response(JSON.stringify({ clientSecret: session.client_secret }), { status: 200, headers: { ...corsHeaders, "Content-Type": "application/json" },