## TL;DR

Stripe and Xero name and structure tax rates differently, so the sync needs an explicit mapping table from each Stripe tax rate id to the correct Xero tax rate. Build the map once per jurisdiction, validate it on a test invoice sync, and fail loudly on unmapped rates instead of defaulting. Review the map whenever either side adds a rate.

## Steps

1. Export all Stripe tax rates in use and all Xero tax rates for the connected org.
   Expected output: Both sides of the mapping are visible.
2. Build the mapping table: Stripe tax rate id to Xero tax rate, per jurisdiction.
   Expected output: Every rate has a defined counterpart.
3. Sync a test invoice per jurisdiction and verify the Xero invoice tax matches Stripe to the cent.
   Expected output: The map is proven, not assumed.
4. Make unmapped rates a hard error that pages someone, not a silent default.
   Expected output: New rates cannot slip through wrong.
5. Re-audit the map quarterly and when either platform announces tax changes.
   Expected output: Drift is caught on a schedule.

## When to use

- Stripe-to-Xero sync posts wrong tax
- Tax rates fail to map during sync
- You add a new jurisdiction

## When not to use

- Customer or contact mapping fails (different map)
- Line items mismatch (different problem)
- You sync to QuickBooks instead (same idea, different rate tables)

## Compatibility

Stripe Tax Rates API; Xero Accounting API tax rates. Any sync middleware or custom integration.

## Variant phrasings

### ### Stripe Xero tax mapping sync

### ### Xero invoice tax rate mismatch Stripe

### ### sync tax rates Stripe to Xero

## Root cause

The two systems model tax independently: Stripe tax rates carry jurisdiction metadata from Stripe Tax, Xero tax rates carry local compliance settings, and neither knows the other's ids. An explicit map is the only bridge, and implicit guessing (by name or rate percent) breaks on same-percent different-treatment rates.

## Edge cases

- Same percentage, different treatment (exempt vs zero-rated) must map distinctly
- Xero orgs in different countries have different rate tables; the map is per org
- Archived Xero rates reject new invoices; map to active rates only

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_fkW7Ki0biGjX23m5sNOv0A
