Coming soon – This feature is rolling out in the next UniBee release. The APIs and UI entries below are final, but production tenants won’t see them until the official launch announcement.
Overview
UniBee now supports a dedicated US VAT workflow powered by TaxJar (and future gateways). You can:- Connect a TaxJar account via API key and set it as the default US VAT gateway.
- Define global defaults (tax code, origin/destination addresses, nexus addresses, upload/validation toggles).
- Override tax settings per product or plan with the same
usVATConfigschema. - Enforce US-only sales, address validation, and automatic TaxJar filings.
- Use either the Admin Portal import forms or the APIs listed below.
1. Initialize the TaxJar gateway
Prerequisite: TaxJar API key with the “Transactions” scope enabled (for tax calculation and order uploads).
Admin Portal steps
- Go to Settings → VAT & Tax → US VAT gateways.
- Click Add gateway and pick TaxJar.
- Paste your API key, mark whether it should be the default gateway, and save.
API example
gatewayName– currentlyTaxJar; future gateways will use the same endpoint.isDefault– settrueif this should become the global default.apiKeys.apiKey– the live or sandbox token from TaxJar.
After initialization, you can confirm the connection by callingGET /merchant/profile/get. The response now includesusVATAPIKeysandglobalUSVATConfig.
2. Configure the global US VAT defaults
Once a gateway is available, configure the global policy that will be used whenever product/plan overrides are absent.Key fields
| Field | Required | Description |
|---|---|---|
active | Required | Master toggle. Set true to enable US VAT globally. |
defaultGatewayName | Required | Pick TaxJar or any other enabled US VAT gateway. |
taxCode | Required | Default product tax code. Use the category list endpoint (below) to fetch valid codes. |
fromAddress | Required | Where goods/services originate. TaxJar uses this and the “to” address to compute tax. |
toAddress | Required | Default destination when checkout data is missing (usually your primary nexus). |
nexusAddresses | Optional | Additional nexus states/cities. The format mirrors TaxJar’s nexus_addresses. |
checkAddressViaGateway | Optional | When true, every US address must be validated via TaxJar’s /addresses/validate API. |
uploadInvoiceToGateway | Optional | When true, UniBee uploads invoices to the gateway so TaxJar can file taxes on your behalf. |
API example
- The response to
GET /merchant/profile/getincludesavailableGatewayNames. Use this list to render gateway pickers—no need to supply it when you callsetup_global_us_vat_config. - Changing
defaultGatewayNameclears the cached tax code list. Prompt users to fetch a fresh list via/merchant/vat/us_vat_category_list. - When the global config is active and a shopper selects
USin Checkout/Sub Update/Assign Subscription, the address becomes mandatory. After the address changes, call your Preview API again so UniBee recalculates tax. - Invoice metadata now carries
USVATCalculateHistoryRequestIdandUSVATCalculateGatewayNamefor auditability.
3. Product & plan-level overrides
Every Product and Plan now accepts anusVATConfig block so you can override global defaults.
| Field | Required | Description |
|---|---|---|
active | Required for override | Enable/disable the override. Requires at least one active US VAT gateway. |
taxCode | Optional | Override the product tax code for this product/plan. |
fromAddress, toAddress, nexusAddresses | Optional | Override addresses; if different plan/add-on addresses exist in one checkout, UniBee automatically splits invoices to compute tax correctly. |
sellOnUSOnly | Optional (plan only) | When true, UniBee hides the plan unless the buyer is located in the US. This flag also appears in the Checkout Plan Detail response as sellOnUSOnly. |
JSON snippet (Plan update)
active: true; otherwise the override is ignored. The precedence order for a given purchase is Plan → Product → Global.
4. Checkout & operational behavior
- US address required – When global US VAT is active and the shopper selects
US, Checkout/Sub Update/Assign Subscription screens must collect the full US address. - Force address validation – If
checkAddressViaGateway = true, any US address (checkout, product config, plan config, global config) must be validated by callingPOST /merchant/vat/us_vat_validate_address. Surface the normalized suggestions returned by TaxJar for the user to choose. - Preview after address change – Tax amounts differ per state/city/ZIP, so always re-run the preview API after the user edits their US address.
- Upload invoices – When
uploadInvoiceToGateway = true, UniBee submits invoices to TaxJar automatically, enabling managed filings. - TaxJar category list – Use
GET /merchant/vat/us_vat_category_listto show the latest product tax codes. The list is gateway-specific; refetch whenever the default gateway changes. - UI hints –
availableGatewayNames(fromGET /merchant/profile/get) tells you which gateways can be selected in Global Config forms. - Metadata on invoices – Helps support teams trace which gateway calculation and request ID were used.
- US-only plans – Checkout Plan Detail responses now include
sellOnUSOnly(outer flag) so you can hide non-US plans until the buyer selects the United States.
5. API reference cheat sheet
| Purpose | Method & Path | Notes |
|---|---|---|
| Setup TaxJar (or another US VAT gateway) | POST /merchant/vat/setup_us_vat_gateway | Provide gatewayName, API key, and whether it is default. |
| Configure global US VAT defaults | POST /merchant/vat/setup_global_us_vat_config | Sends the USVATGlobalConfig object shown above. |
| Fetch current status + available gateways | GET /merchant/profile/get | Response adds globalUSVATConfig, usVATAPIKeys, and availableGatewayNames. |
| List TaxJar product tax codes | GET /merchant/vat/us_vat_category_list | Use after gateway setup or when the default gateway changes. |
| Validate a US address | POST /merchant/vat/us_vat_validate_address | Pass { "address": { ... } }; use the normalized addresses returned to confirm with the user. |
| Plan/Product overrides | Standard plan/product create/edit APIs | Each now accepts usVATConfig. Remember to set active: true. |
| Checkout metadata | Checkout Plan Detail, Preview, and Invoice endpoints | Look for sellOnUSOnly and invoice metadata keys for US VAT. |
6. Front-end checklist
- ☑️ Render the available gateways using
availableGatewayNames. - ☑️ When the default gateway changes, clear dependent fields (tax code, addresses, nexus) and prompt the user to fetch the new category list.
- ☑️ Enforce US address collection any time the buyer selects
USwhile global US VAT is active. - ☑️ If forced address validation is enabled, make sure both customer-entered addresses and configuration addresses are validated via
us_vat_validate_address. - ☑️ After successful validation or manual edits, rerun the Preview API because taxes will change.
- ☑️ Respect the
sellOnUSOnlyflag when showing plans in Checkout/Hosted pages. - ☑️ Surface errors when an address, gateway, or tax code is missing—UniBee will reject the calculation otherwise.
By following the steps above, you can roll out the new US VAT automation with TaxJar, keep your checkout compliant, and ensure that finance teams have the right data for filings. Let us know if you need sandbox credentials or additional sample payloads.

