diff --git a/api/src/routes/checkout.ts b/api/src/routes/checkout.ts index c64eee6..f4c85cd 100644 --- a/api/src/routes/checkout.ts +++ b/api/src/routes/checkout.ts @@ -1282,9 +1282,17 @@ export async function handlePaymentComplete( const discountLine = discountCents > 0 ? `Discount: -$${(discountCents / 100).toFixed(2)} (${order.discount_code || "promo"})\n` : ""; + // Show DOT# or FRN/CORES ID depending on service type + const intake = (typeof order.intake_data === "object" && order.intake_data) || {}; + const dotNumber = (intake as any).dot_number || ""; + const frn = (intake as any).frn || ""; + const idLine = dotNumber ? `DOT#: ${dotNumber}\n` + : frn ? `FRN: ${frn}\n` + : ""; const msg = `💰 NEW ORDER\n\n` + `Customer: ${customerName}\n` + `Email: ${customerEmail}\n` + + idLine + `Service: ${serviceName}\n` + `Total: $${totalDollars}\n` + discountLine