fix(checkout): trucking new-carrier ordered the wrong (telecom) product + ACH broke
Two reported bugs, plus two related ones found while tracing: 1. WRONG PRODUCT (Stripe showed 'FCC setup package' for a trucking order): the trucking new-carrier form reused the slug 'new-carrier-bundle', which is the TELECOM VoIP onboarding bundle (FRN+499+RMD+CPNI+CALEA, $1799). So trucking customers were charged the telecom product/price and saw FCC on their receipt. Added a distinct 'dot-new-carrier-bundle' (USDOT+MC+BOC-3+MCS-150+Drug&Alcohol, $599 + FMCSA gov fees) and pointed the trucking page at it. 2. ACH 500 error: the Stripe session requested the Financial Connections 'balances' permission, which isn't activated on the account -> Stripe rejected the whole session (invalid_request_error). Removed 'balances' (+prefetch); we only need 'payment_method' to collect+charge the bank account. Also fixed (found while tracing): 3. The telecom new-carrier-bundle's BUNDLE_COMPONENTS listed TRUCKING slugs by mistake (copy/paste) -- corrected to its real FCC components. 4. The trucking page offered llc-formation / corp-formation / foreign-qual which did not exist in the catalog (batch would 400). Added llc-formation + corp-formation; remapped foreign-qual -> foreign-qualification-single. Catalog regenerated (66 -> 69 services), drift-check + tsc clean.
This commit is contained in:
parent
7c39a858cc
commit
c6819371d8
5 changed files with 52 additions and 6 deletions
|
|
@ -1272,13 +1272,18 @@ router.post("/api/v1/checkout/create-session", async (req, res) => {
|
||||||
...(erpnextCustomer ? { erpnext_customer: erpnextCustomer } : {}),
|
...(erpnextCustomer ? { erpnext_customer: erpnextCustomer } : {}),
|
||||||
},
|
},
|
||||||
payment_intent_data: paymentIntentData,
|
payment_intent_data: paymentIntentData,
|
||||||
// ACH via Plaid: verify account balance before accepting payment
|
// ACH via Financial Connections: collect bank account details only.
|
||||||
|
// (We intentionally do NOT request the 'balances' permission: that
|
||||||
|
// requires activating the Financial Connections "balances" product in the
|
||||||
|
// Stripe dashboard, and without it Stripe rejects the whole session with
|
||||||
|
// an invalid_request_error. Plain payment_method collection is enough to
|
||||||
|
// charge ACH; verification_method:instant still does microdeposit-free
|
||||||
|
// instant verification where supported.)
|
||||||
...(payment_method === "ach" ? {
|
...(payment_method === "ach" ? {
|
||||||
payment_method_options: {
|
payment_method_options: {
|
||||||
us_bank_account: {
|
us_bank_account: {
|
||||||
financial_connections: {
|
financial_connections: {
|
||||||
permissions: ["payment_method", "balances"],
|
permissions: ["payment_method"],
|
||||||
prefetch: ["balances"],
|
|
||||||
},
|
},
|
||||||
verification_method: "instant",
|
verification_method: "instant",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,16 @@ const BUNDLE_COMPONENTS: Record<string, string[]> = {
|
||||||
"ct-highway-use-fee", "ca-mcp-carb", "state-dot-registration",
|
"ct-highway-use-fee", "ca-mcp-carb", "state-dot-registration",
|
||||||
"intrastate-authority",
|
"intrastate-authority",
|
||||||
],
|
],
|
||||||
|
// Telecom VoIP onboarding bundle: composes the FCC filings a brand-new
|
||||||
|
// carrier needs (FRN, 499 Initial, RMD, CPNI, CALEA). (Previously this listed
|
||||||
|
// TRUCKING component slugs by mistake -- a copy/paste error from the DOT
|
||||||
|
// bundle below.)
|
||||||
"new-carrier-bundle": [
|
"new-carrier-bundle": [
|
||||||
|
"cores-frn-registration", "fcc-499-initial", "rmd-filing",
|
||||||
|
"cpni-certification", "calea-ssi",
|
||||||
|
],
|
||||||
|
// Trucking/DOT new-carrier starter bundle components.
|
||||||
|
"dot-new-carrier-bundle": [
|
||||||
"dot-registration", "mc-authority", "boc3-filing",
|
"dot-registration", "mc-authority", "boc3-filing",
|
||||||
"mcs150-update", "dot-drug-alcohol", "ucr-registration",
|
"mcs150-update", "dot-drug-alcohol", "ucr-registration",
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,19 @@ export const COMPLIANCE_SERVICES: Record<string, ComplianceService> = {
|
||||||
erpnext_item: "NEW-CARRIER-BUNDLE",
|
erpnext_item: "NEW-CARRIER-BUNDLE",
|
||||||
discountable: true,
|
discountable: true,
|
||||||
},
|
},
|
||||||
|
// Trucking/DOT brand-new-carrier starter bundle (composes the FMCSA filings a
|
||||||
|
// new motor carrier needs to start operating). DISTINCT from the telecom
|
||||||
|
// new-carrier-bundle above -- they are different verticals and must not share
|
||||||
|
// a slug (doing so charged trucking customers the telecom product/price and
|
||||||
|
// showed "FCC" on their receipt). Components in BUNDLE_COMPONENTS.
|
||||||
|
"dot-new-carrier-bundle": {
|
||||||
|
name: "New Carrier Starter Bundle (USDOT + MC Authority + BOC-3 + MCS-150 + Drug & Alcohol)",
|
||||||
|
price_cents: 59900,
|
||||||
|
gov_fee_cents: 30000,
|
||||||
|
gov_fee_label: "FMCSA registration fees (USDOT + operating authority, billed at cost)",
|
||||||
|
erpnext_item: "DOT-NEW-CARRIER-BUNDLE",
|
||||||
|
discountable: true,
|
||||||
|
},
|
||||||
// NECA OCN registration — required for VoIP/IPES carriers that need
|
// NECA OCN registration — required for VoIP/IPES carriers that need
|
||||||
// their own Operating Company Number for STIR/SHAKEN signing, LRN
|
// their own Operating Company Number for STIR/SHAKEN signing, LRN
|
||||||
// assignments, or direct numbering authority. NECA charges $550
|
// assignments, or direct numbering authority. NECA charges $550
|
||||||
|
|
@ -211,6 +224,22 @@ export const COMPLIANCE_SERVICES: Record<string, ComplianceService> = {
|
||||||
erpnext_item: "FOREIGN-QUAL-MULTI",
|
erpnext_item: "FOREIGN-QUAL-MULTI",
|
||||||
discountable: true,
|
discountable: true,
|
||||||
},
|
},
|
||||||
|
// Business entity formation (used by the trucking new-carrier flow when the
|
||||||
|
// carrier needs to form an LLC/corp before registering). Formation is also
|
||||||
|
// available via the dedicated /order/formation flow; these catalog entries
|
||||||
|
// let the new-carrier batch include formation as a line item.
|
||||||
|
"llc-formation": {
|
||||||
|
name: "LLC Formation",
|
||||||
|
price_cents: 19900,
|
||||||
|
erpnext_item: "LLC-FORMATION",
|
||||||
|
discountable: true,
|
||||||
|
},
|
||||||
|
"corp-formation": {
|
||||||
|
name: "Corporation Formation",
|
||||||
|
price_cents: 24900,
|
||||||
|
erpnext_item: "CORP-FORMATION",
|
||||||
|
discountable: true,
|
||||||
|
},
|
||||||
// State PUC/PSC Registration — $399 per-state service fee + state
|
// State PUC/PSC Registration — $399 per-state service fee + state
|
||||||
// filing fees. Bond procurement coordinated separately.
|
// filing fees. Bond procurement coordinated separately.
|
||||||
"state-puc": {
|
"state-puc": {
|
||||||
|
|
|
||||||
|
|
@ -904,7 +904,7 @@ var SERVICE_CATALOG = {
|
||||||
"mcs150-update": { name: "MCS-150 Filing", price: 6900, govfee: 0, slug: "mcs150-update", nodiscount: false },
|
"mcs150-update": { name: "MCS-150 Filing", price: 6900, govfee: 0, slug: "mcs150-update", nodiscount: false },
|
||||||
"llc-formation": { name: "LLC Formation", price: 19900, govfee: 0, slug: "llc-formation", nodiscount: false },
|
"llc-formation": { name: "LLC Formation", price: 19900, govfee: 0, slug: "llc-formation", nodiscount: false },
|
||||||
"corp-formation": { name: "Corporation Formation", price: 24900, govfee: 0, slug: "corp-formation", nodiscount: false },
|
"corp-formation": { name: "Corporation Formation", price: 24900, govfee: 0, slug: "corp-formation", nodiscount: false },
|
||||||
"foreign-qual": { name: "Foreign Qualification", price: 14900, govfee: 0, slug: "foreign-qual", nodiscount: false },
|
"foreign-qual": { name: "Foreign Qualification", price: 14900, govfee: 0, slug: "foreign-qualification-single", nodiscount: false },
|
||||||
"dot-drug-alcohol": { name: "Drug & Alcohol Program", price: 14900, govfee: 0, slug: "dot-drug-alcohol", nodiscount: true },
|
"dot-drug-alcohol": { name: "Drug & Alcohol Program", price: 14900, govfee: 0, slug: "dot-drug-alcohol", nodiscount: true },
|
||||||
"ucr-registration": { name: "UCR Registration", price: 6900, govfee: 0, slug: "ucr-registration", nodiscount: false },
|
"ucr-registration": { name: "UCR Registration", price: 6900, govfee: 0, slug: "ucr-registration", nodiscount: false },
|
||||||
"registered-agent": { name: "Registered Agent (per state)",price: 9900, govfee: 0, slug: "registered-agent", nodiscount: false }
|
"registered-agent": { name: "Registered Agent (per state)",price: 9900, govfee: 0, slug: "registered-agent", nodiscount: false }
|
||||||
|
|
@ -1067,7 +1067,7 @@ document.getElementById("use-bundle").addEventListener("change", function() {
|
||||||
function getSelectedServices() {
|
function getSelectedServices() {
|
||||||
var svcs = [];
|
var svcs = [];
|
||||||
if (wiz.useBundle) {
|
if (wiz.useBundle) {
|
||||||
svcs.push({ slug: "new-carrier-bundle", price: 59900, govfee: 30000, name: "New Carrier Starter Bundle", nodiscount: true });
|
svcs.push({ slug: "dot-new-carrier-bundle", price: 59900, govfee: 30000, name: "New Carrier Starter Bundle", nodiscount: true });
|
||||||
// Add non-bundle optional services
|
// Add non-bundle optional services
|
||||||
document.querySelectorAll("#svc-list .svc-row.optional").forEach(function(row) {
|
document.querySelectorAll("#svc-list .svc-row.optional").forEach(function(row) {
|
||||||
var cb = row.querySelector(".opt-svc-cb");
|
var cb = row.querySelector(".opt-svc-cb");
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
* AUTO-GENERATED -- DO NOT EDIT.
|
* AUTO-GENERATED -- DO NOT EDIT.
|
||||||
*
|
*
|
||||||
* Source of truth: api/src/service-catalog.ts (COMPLIANCE_SERVICES).
|
* Source of truth: api/src/service-catalog.ts (COMPLIANCE_SERVICES).
|
||||||
* Regenerate with: node scripts/gen-service-catalog.mjs (runs on site prebuild).
|
* Regenerate with: python3 scripts/gen-service-catalog.py (runs on deploy).
|
||||||
*
|
*
|
||||||
* Display-only subset (name, price_cents, gov_fee_label) of the API catalog,
|
* Display-only subset (name, price_cents, gov_fee_label) of the API catalog,
|
||||||
* so the public site can never drift from what the API actually charges.
|
* so the public site can never drift from what the API actually charges.
|
||||||
|
|
@ -28,12 +28,14 @@ export const SERVICE_META: Record<string, ServiceMeta> = {
|
||||||
"cdr-storage-tier2": { name: "CDR Storage Tier 2 (250 GB / 250M calls)", price_cents: 29900 },
|
"cdr-storage-tier2": { name: "CDR Storage Tier 2 (250 GB / 250M calls)", price_cents: 29900 },
|
||||||
"cdr-storage-tier3": { name: "CDR Storage Tier 3 (1 TB / 1B calls)", price_cents: 79900 },
|
"cdr-storage-tier3": { name: "CDR Storage Tier 3 (1 TB / 1B calls)", price_cents: 79900 },
|
||||||
"cores-frn-registration": { name: "CORES / FRN Registration", price_cents: 14900 },
|
"cores-frn-registration": { name: "CORES / FRN Registration", price_cents: 14900 },
|
||||||
|
"corp-formation": { name: "Corporation Formation", price_cents: 24900 },
|
||||||
"cpni-certification": { name: "CPNI Annual Certification", price_cents: 19900 },
|
"cpni-certification": { name: "CPNI Annual Certification", price_cents: 19900 },
|
||||||
"ct-highway-use-fee": { name: "CT Highway Use Fee Setup", price_cents: 10900, gov_fee_label: "CT Highway Use Fee registration (state, billed at cost)" },
|
"ct-highway-use-fee": { name: "CT Highway Use Fee Setup", price_cents: 10900, gov_fee_label: "CT Highway Use Fee registration (state, billed at cost)" },
|
||||||
"dc-agent": { name: "D.C. Registered Agent (Annual)", price_cents: 14900 },
|
"dc-agent": { name: "D.C. Registered Agent (Annual)", price_cents: 14900 },
|
||||||
"dot-audit-prep": { name: "New Entrant Safety Audit Preparation", price_cents: 39900 },
|
"dot-audit-prep": { name: "New Entrant Safety Audit Preparation", price_cents: 39900 },
|
||||||
"dot-drug-alcohol": { name: "DOT Drug & Alcohol Compliance Program", price_cents: 14900 },
|
"dot-drug-alcohol": { name: "DOT Drug & Alcohol Compliance Program", price_cents: 14900 },
|
||||||
"dot-full-compliance": { name: "DOT Full Compliance Bundle", price_cents: 39900 },
|
"dot-full-compliance": { name: "DOT Full Compliance Bundle", price_cents: 39900 },
|
||||||
|
"dot-new-carrier-bundle": { name: "New Carrier Starter Bundle (USDOT + MC Authority + BOC-3 + MCS-150 + Drug & Alcohol)", price_cents: 59900, gov_fee_label: "FMCSA registration fees (USDOT + operating authority, billed at cost)" },
|
||||||
"dot-registration": { name: "New USDOT Number Registration", price_cents: 8900 },
|
"dot-registration": { name: "New USDOT Number Registration", price_cents: 8900 },
|
||||||
"ein-application": { name: "EIN Application (IRS SS-4)", price_cents: 7900 },
|
"ein-application": { name: "EIN Application (IRS SS-4)", price_cents: 7900 },
|
||||||
"emergency-temporary-authority": { name: "Emergency Temporary Authority (ETA)", price_cents: 49900 },
|
"emergency-temporary-authority": { name: "Emergency Temporary Authority (ETA)", price_cents: 49900 },
|
||||||
|
|
@ -57,6 +59,7 @@ export const SERVICE_META: Record<string, ServiceMeta> = {
|
||||||
"intrastate-authority": { name: "Intrastate Operating Authority", price_cents: 10900, gov_fee_label: "State intrastate authority filing fee (state, billed at cost)" },
|
"intrastate-authority": { name: "Intrastate Operating Authority", price_cents: 10900, gov_fee_label: "State intrastate authority filing fee (state, billed at cost)" },
|
||||||
"irp-registration": { name: "IRP Registration Assistance", price_cents: 10900, gov_fee_label: "Apportioned IRP registration & plate fees (state, by jurisdictions + weight, billed at cost)" },
|
"irp-registration": { name: "IRP Registration Assistance", price_cents: 10900, gov_fee_label: "Apportioned IRP registration & plate fees (state, by jurisdictions + weight, billed at cost)" },
|
||||||
"ky-kyu-registration": { name: "KY Weight-Distance Tax Setup", price_cents: 10900, gov_fee_label: "KYU weight-distance account fees (state, billed at cost)" },
|
"ky-kyu-registration": { name: "KY Weight-Distance Tax Setup", price_cents: 10900, gov_fee_label: "KYU weight-distance account fees (state, billed at cost)" },
|
||||||
|
"llc-formation": { name: "LLC Formation", price_cents: 19900 },
|
||||||
"mc-authority": { name: "MC Operating Authority Application", price_cents: 19900, gov_fee_label: "FMCSA operating authority application fee" },
|
"mc-authority": { name: "MC Operating Authority Application", price_cents: 19900, gov_fee_label: "FMCSA operating authority application fee" },
|
||||||
"mcs150-update": { name: "MCS-150 Biennial Update", price_cents: 3900 },
|
"mcs150-update": { name: "MCS-150 Biennial Update", price_cents: 3900 },
|
||||||
"medicare-enrollment": { name: "Medicare Enrollment (PECOS)", price_cents: 69900 },
|
"medicare-enrollment": { name: "Medicare Enrollment (PECOS)", price_cents: 69900 },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue