Phase8: Auto bill credit card
Some checks failed
Build and Push / build (push) Failing after 1m2s

This commit is contained in:
2026-05-27 22:12:25 +02:00
parent ee6bb89fb6
commit a6c3c42ec9

View File

@@ -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,