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 } : {}),
|
||||
},
|
||||
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_options: {
|
||||
us_bank_account: {
|
||||
financial_connections: {
|
||||
permissions: ["payment_method", "balances"],
|
||||
prefetch: ["balances"],
|
||||
permissions: ["payment_method"],
|
||||
},
|
||||
verification_method: "instant",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -238,7 +238,16 @@ const BUNDLE_COMPONENTS: Record<string, string[]> = {
|
|||
"ct-highway-use-fee", "ca-mcp-carb", "state-dot-registration",
|
||||
"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": [
|
||||
"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",
|
||||
"mcs150-update", "dot-drug-alcohol", "ucr-registration",
|
||||
],
|
||||
|
|
|
|||
|
|
@ -135,6 +135,19 @@ export const COMPLIANCE_SERVICES: Record<string, ComplianceService> = {
|
|||
erpnext_item: "NEW-CARRIER-BUNDLE",
|
||||
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
|
||||
// their own Operating Company Number for STIR/SHAKEN signing, LRN
|
||||
// assignments, or direct numbering authority. NECA charges $550
|
||||
|
|
@ -211,6 +224,22 @@ export const COMPLIANCE_SERVICES: Record<string, ComplianceService> = {
|
|||
erpnext_item: "FOREIGN-QUAL-MULTI",
|
||||
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
|
||||
// filing fees. Bond procurement coordinated separately.
|
||||
"state-puc": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue