Web application / Stripe Tax

Stripe Tax: Opaque txcd codes, location fallbacks and ledger traps

Public OpenAPI (63 operations / 46 paths) and documentation analysis of Stripe Tax: head_office readiness, 685 opaque txcd_* codes, flat retail delivery fees, ZIP-centroid fallback ignoring ZIP+4, invoice/dispute accounting gaps, and live-only threshold tracking.

Contract model · conceptual sequence, not a claim about internal deployment
  1. head_office + active registration + txcd_*
  2. Rooftop vs 5-digit ZIP centroid (ZIP+4 ignored)
  3. Invoice finalization lock + create_reversal ledger
01 / EMPIRICAL RECORD

Investigation question

How does Stripe Tax gate calculation on Settings and active Registrations, enforce immutability on tax_behavior and invoice finalization, fall back across US address precision, and diverge between refunds, partial captures, disputes, and threshold monitoring?

02 / EMPIRICAL RECORD

Observed

Extracting the 63-operation / 46-path indirect-tax slice from stripe/openapi spec3.json alongside 15 official docs.stripe.com/tax*.md specifications and stripe@23.2.0 JS client bindings documents Stripe Tax’s configuration and calculation invariants. First, readiness requires two explicit objects: /v1/tax/settings must reach status="active" (validated head_office.address) before /v1/tax/registrations can be created, and any jurisdiction lacking an active registration covering the transaction date returns $0.00 with taxability_reason="not_collecting". Colorado and Minnesota flat Retail Delivery Fees require dedicated registrations (country_options[us][type]=state_retail_delivery_fee) and appear inside shipping_cost.tax_breakdown with rate_type="flat_amount". Second, Stripe Tax ships 685 unique 8-digit txcd_* product tax codes documented as opaque exact tokens (never heuristically extrapolated) and makes Price tax_behavior ("inclusive" vs "exclusive") immutable once set on a Price/currency option. Third, US address lookup runs USPS rooftop geocoding first, falling back directly to 5-digit ZIP centroids while explicitly ignoring ZIP+4 digits—creating boundary drift across 19 split-ZIP/home-rule states. Fourth, economic nexus threshold monitoring runs daily in live mode only (zero test-mode simulation, $10,000 suppressed-notification alert gate, 24–48 hour refund adjustment lag).

03 / EMPIRICAL RECORD

Inferred

Four operational accounting hazards require explicit reconciliation outside Stripe Tax: (1) for Invoices with automatic_tax.enabled=true, tax locks at invoice finalization (draft -> open) and is NOT reversed by failed or canceled payment attempts unless the invoice is voided, marked uncollectible, or offset by a CreditNote; (2) partial refunds or credit notes can retain a $0.01 residual via cumulative remainder rounding and skew sub-jurisdiction location breakdowns on multi-rate orders unless paired with a full create_reversal and replacement transaction; (3) upheld bank chargebacks and partial manual captures never reduce reported tax in Stripe Tax exports; and (4) Standalone Tax API calls (/v1/tax/calculations) never silently fall back to Customer or IP locations, forcing callers to supply explicit customer_details.

04 / METHODOLOGICAL BOUNDARY

Unknown & limitations

This analysis relies strictly on public OpenAPI specifications, official Stripe Tax Markdown guides, and public SDK packages; no live Stripe Tax account activation, billing charge, EU OSS filing export, or live threshold alert run was executed.

05 / EMPIRICAL RECORD

Architecture

Stripe Tax splits global seller configuration (/v1/tax/settings) and jurisdiction authority (/v1/tax/registrations) from two execution paths: integrated automatic_tax inside Checkout Sessions, Invoices, Payment Links, and Subscriptions versus the Standalone Tax API (/v1/tax/calculations -> /v1/tax/transactions/create_from_calculation -> create_reversal), feeding daily batch threshold monitoring and 3 CSV report exports.

06 / EMPIRICAL RECORD

Domain & data models

tax.calculation exposes minor-unit amount_total, tax_amount_exclusive, tax_amount_inclusive, shipping_cost (holding flat_amount Retail Delivery Fees), and deterministic jurisdiction breakdowns ordered by (jurisdiction_level, tax_amount, jurisdiction_name) across 18 tax_type categories. tax.transaction and tax.transaction_reversal form an immutable accounting ledger linked by reversal_original_tax_transaction_id.

07 / EMPIRICAL RECORD

Workflows & state machines

Standalone tax commits require head_office setup -> active registration -> calculation preview (taxcalc_*, subtracting discounts prior to submission) -> transaction commit (tax_*) -> full reversal + replacement on multi-rate line edits. Daily threshold attribution walks a 6-step waterfall (validated address -> Customer address -> AVS postal code -> card issuer country -> local payment method -> IP, falling back to unattributed US revenue).

08 / EMPIRICAL RECORD

API & protocol surfaces

63 OpenAPI 3.0 operations across 46 paths (/v1/tax/settings, /v1/tax/registrations, /v1/tax/calculations, /v1/tax/transactions/*, /v1/tax_codes, /v1/tax/locations, /v1/tax/associations/find, /v1/customers/*/tax_ids, /v1/credit_notes, /v1/shipping_rates), itemized CSV exports (8-decimal tax_rate, 17 taxability_reason enums) vs summarized CSV exports (6-decimal tax_rate), and Stripe Remote MCP tax preview tools.