From a6c3c42ec9cc1526fd1cdb24393b39b2145cce63 Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 27 May 2026 22:12:25 +0200 Subject: [PATCH] Phase8: Auto bill credit card --- src/app/api/onboarding/route.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/app/api/onboarding/route.ts b/src/app/api/onboarding/route.ts index a65e4ff..7b33dbf 100644 --- a/src/app/api/onboarding/route.ts +++ b/src/app/api/onboarding/route.ts @@ -522,11 +522,9 @@ export async function POST(request: Request) { tenantRequest.id ); - // Build the billing snapshot from the org's address. The wizard - // collected the address into billingAddress on first-ever orders; - // for subsequent ones we read the org_billing row. Either way we - // need a complete snapshot for the invoice + Stripe customer. - const orgBilling = await getOrgBilling(user.orgId); + // Build the billing snapshot from the org's address (already + // fetched above for the wizard's billing-address resolution). + // The snapshot is what the invoice + Stripe customer use. const billingSnapshot: InvoiceBillingSnapshot = orgBilling ? { companyName: orgBilling.companyName,