Commercial Invoice & Packing List JSON/HTML Generator (Cent-Exact Decimal)
A $0.01 rounding mismatch between a Commercial Invoice subtotal and line-item sum—or a missing HS code, Incoterm, or gross/net weight on a Packing List—can hold an entire container in CBP or EU customs exam. Stage 3 emits cent-exact Decimal JSON and printable HTML ready for your customs broker.
Why Floating-Point Spreadsheets & Manual Word Docs Trigger Customs Holds
Standard binary floating-point math (IEEE 754 float) frequently produces penny drift when multiplying multi-SKU unit quantities by fractional FOB prices or allocating ocean freight and 0.50% cargo insurance across invoice lines. Even a $0.02 variance between the declared invoice total and the sum of line extensions fails automated customs EDI validation (US ACE, EU ICS2, Japan NACCS).
Packing Lists fail just as often when carton counts, units per carton, net weight (product only), gross weight (product + carton tare), and total CBM do not reconcile with the Bill of Lading or Air Waybill. CrossBorder-Empire-OS locks both documents to a single Decimal truth source so every weight, carton, and cent matches.
Worked Decimal Reconciliation: 3-SKU Electronics Commercial Invoice (CN -> US)
Demonstrating exact Decimal ROUND_HALF_UP reconciliation across three HTSUS lines, freight ($640.00), and 0.50% cargo insurance.
- Line 1 — 600x ANC Earbuds (HS 8518.30.2000, Origin CN) @ $11.50 = $6900.00.
- Line 2 — 300x Portable Bluetooth Speakers (HS 8518.21.0000, Origin CN) @ $16.35 = $4905.00.
- Line 3 — 400x Braided USB-C Cables (HS 8544.42.9090, Origin CN) @ $1.87 = $748.00.
- Exact FOB Subtotal: $6900.00 + $4905.00 + $748.00 = $12553.00 (variance = $0.00).
- Insurance (0.50% of FOB, ROUND_HALF_UP): $12553.00 x 0.0050 = $62.77. Exact CIF Total: $12553.00 + $640.00 + $62.77 = $13255.77.
Mandatory Commercial Invoice & Packing List Fields (US ACE / EU ICS2 / JP NACCS)
Always have your licensed customs broker verify final importer/consignee tax IDs (EIN/IOR, EORI, ACP) before filing.
| Document Field | Commercial Invoice | Packing List | Reconciliation Invariant |
|---|---|---|---|
| HS Code & Plain Description | 6/8/10-digit HS + exact SKU material/use | SKU & carton mark mapping | Avoid vague terms like 'parts' or 'electronics' |
| Country of Origin | ISO-2 & full name per line (e.g., CN) | Carton country-of-origin marking | Must match physical 'Made in ...' markings |
| Quantities & Cartons | Unit count & UOM (PCS/SET) | Carton count, units/carton, dims | sum(cartons * units_per_carton) == invoice qty |
| Monetary Totals (Decimal) | Unit FOB, line ext, FOB, freight, ins, CIF | N/A (non-monetary weight/vol doc) | sum(line_ext) == fob_total; fob+fr+ins == cif |
| Weights & Volume | Optional total gross weight | Net kg, Gross kg (incl. tare), CBM | Gross kg > Net kg; matches B/L & AWB |
Actionable Engineering & Export Checklist
- State exact Incoterms 2020 (e.g., FOB Shenzhen, CIF Hamburg, DDP Los Angeles) and currency (USD/EUR/JPY).
- Itemize international freight and marine insurance separately so US brokers can deduct them for FOB customs valuation.
- Ensure physical carton marks and net/gross weights on the Packing List match factory weigh-in tickets.
- Never generate 'dual invoices' with lower customs values—CrossBorder-Empire-OS rejects any under-declaration request at $0 charge.
Working REST API & Streamable /mcp Examples
1. REST API Call (POST https://crossborder.fastmesh.dev/v1/crossborder/optimize-ship)
curl -fsSL -X POST "https://crossborder.fastmesh.dev/v1/crossborder/optimize-ship" \
-H "Content-Type: application/json" \
-d '{"sku_id":"TWS-CI-01","product_name":"ANC Wireless Bluetooth Earbuds","category":"electronics_lithium","hs_code":"8518.30.2000","origin_country":"CN","target_markets":["US","DE"],"quantity":600,"unit_fob_usd":11.50,"unit_weight_kg":0.18,"unit_dims_cm":{"length":10.5,"width":8.5,"height":4.2},"shipping_mode":"matson_fast_ocean","tenant_id":"customs_docs_ops"}'
2. Native AI Agent Call (POST https://crossborder.fastmesh.dev/mcp · JSON-RPC 2.0)
curl -fsSL -X POST "https://crossborder.fastmesh.dev/mcp" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"optimize_shipping_carton","arguments":{"sku_id":"TWS-CI-01","category":"electronics_lithium","hs_code":"8518.30.2000","origin_country":"CN","target_markets":["US","DE"],"quantity":600,"unit_fob_usd":11.50,"unit_weight_kg":0.18,"unit_dims_cm":{"length":10.5,"width":8.5,"height":4.2},"shipping_mode":"matson_fast_ocean"}}}'
OpenAPI 3.1: /openapi.json · Agent Skill: /skill.md · Machine Index: /llms.txt · Treg Hub: crossborder-empire-os (0% seller commission) · Causal Bazaar: crossborder_empire_os_v1
Zero-Failure $0 Billing, Privacy Pledge & Never-Expiring Prepaid Packs
HTTP 422 with billable: false and charge_micros: 0.Zero BOM / Trade-Secret Reselling Pledge: Submitted factory BOMs, FOB pricing, margins, and export dossiers are never resold or used to train external models. Same-tenant verified cache repeats bill at
10% (90% savings).
Launch SKU Pack
$99.00 credit (99M micros · 660 full 5-stage dossiers / 2,475 landed-cost or ship runs) · One-time
Get Launch SKU PackBrand 15-SKU Pack
$360.00 credit (360M micros · 2,400 full 5-stage dossiers / 9,000 landed-cost runs) · Never expires
Get Brand 15-SKU PackExporter Studio
$1,250.00 credit (1,250M micros · 8,333 full 5-stage dossiers / 31,250 landed-cost runs) · Never expires
Get Exporter StudioFrequently Asked Questions
Does the API return both JSON and printable HTML documents?
Yes. stage_3_ship includes structured commercial_invoice and packing_list JSON objects alongside clean printable documents_html (commercial_invoice_html and packing_list_html).
How is cent-exact accuracy guaranteed?
All line extensions, freight allocations, insurance (0.50% FOB), and subtotals use Python decimal.Decimal quantized to 0.01 with ROUND_HALF_UP and verified by invariant assertions.
Does this generated invoice replace a licensed customs broker?
No. CrossBorder-Empire-OS generates deterministic draft shipping documentation for your ERP and customs broker; final customs entry filing remains the responsibility of the importer of record and licensed broker.