From f773718e4dc8e8a24d72a026006492bb038723ae Mon Sep 17 00:00:00 2001 From: justin Date: Tue, 23 Jun 2026 13:11:35 -0500 Subject: [PATCH] fix(intake): send application/json Content-Type on ReviewStep validate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cold-visitor review-step path POSTed /validate with no Content-Type, so the API returned 415 and validation silently failed — the user could create the order but never advance from review to payment (the last blocker in the trucking/HC checkout funnel). The Wizard's own validate call already set the header; ReviewStep now matches. Completes the checkout repair in 5546c58. --- site/src/components/intake/steps/ReviewStep.astro | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/site/src/components/intake/steps/ReviewStep.astro b/site/src/components/intake/steps/ReviewStep.astro index 8832fcb..f535bdd 100644 --- a/site/src/components/intake/steps/ReviewStep.astro +++ b/site/src/components/intake/steps/ReviewStep.astro @@ -108,10 +108,12 @@ const vertical = slugVertical(service_slug); orderNumber = created.order_number; (window as any).PWIntake.set({ ...state, order_number: orderNumber }); } - // Step 2: validate + // Step 2: validate. The API requires an application/json Content-Type even + // for an empty body — without it the request 415s and validation silently + // fails, stranding the user on the review step (no advance to payment). const vResp = await fetch( `/api/v1/compliance-orders/${orderNumber}/validate`, - { method: "POST" }, + { method: "POST", headers: { "Content-Type": "application/json" }, body: "{}" }, ); const data = await vResp.json(); return {