Sales tax
Flint calculates sales tax as part of an order. Each line item and charge records its own tax in tax_money, and the order's total tax is pricing_amounts.tax_money. Refunds reverse that tax, and tax reports export it for filing.
You choose how an order's tax is calculated:
- Automatic. Flint calculates US sales tax, and tax on digital goods, software, and SaaS sold to buyers in Canada, the EU, the UK, Australia, and New Zealand, using the order's tax location and rates from a tax connection you set up with the API or in the Dashboard.
- External. Your own tax engine calculates the rates, and you send them with each line item and charge. Flint applies them, rounds them, and records one row per jurisdiction.
| Automatic | External | |
|---|---|---|
| Rates come from | Your tax connection | Your tax engine |
| Setup | Connect once, with the API or in the Dashboard | None |
| Where | US addresses; digital goods, software, and SaaS in Canada, the EU, the UK, Australia, and New Zealand | National and subnational jurisdictions you supply |
| Prices | Tax added on top or included in the price | Tax added on top or included in the price |
| Taxed charges | US only: service_fee, shipping, delivery, handling, and surcharge | Any charge |
| Flat fees, such as a retail delivery fee | Not supported | Supported |
| Tax-exempt customers | Supported | Supported |
| Payments | In full or in parts: deposits, split payments, partial manual payments, invoice installments, and manual capture | Any |
| Per-jurisdiction rows on the order | Outside the US, one row per national or provincial tax; US tax stays combined | Yes, in tax.tax_breakdowns |
| Reverse charge for business buyers | From the customer's tax ID, in the EU, the UK, Australia, and New Zealand | When your engine sends it |
| Fee | Automatic tax fee on payments with tax above zero | None |
Flint calculates and reports tax. It doesn't decide where you owe tax, register your business, file returns, or pay the tax you collect. Confirm your obligations with a qualified tax professional.
Warning: Don't send tax as a charge
A charge is something the buyer pays you, such as a delivery fee. Flint doesn't count it in tax_money, in tax reports, or in the tax a refund reverses. Send tax from your own engine as external tax.
Turn on tax for an order#
Set tax when you create or update an order, and state whether each line item is taxable:
{
"tax": {
"enabled": true,
"calculation": {"mode": "automatic", "price_mode": "additive"}
},
"line_items": [{
"type": "custom",
"name": "Ceramic mug",
"quantity": 2,
"unit_price_money": {"amount": 2400, "currency": "USD"},
"fulfillment": {"requirement": "none"},
"tax": {"taxable": true, "line_item_tax_category": "physical_goods"}
}]
}
tax.enabledturns tax on. When you leave outtax, the order follows yourtax.default_enabledsetting (Calculate tax on new orders in the Dashboard), which is off by default. Ataxobject that only setsexemptiondoesn't change this: on create the order follows the same setting, and on update it keeps its current one. Any othertaxobject withoutenabledturns tax on. Turning automatic tax off can switch the setting off.calculation.modeisautomaticorexternal.calculation.price_modeisadditive, where tax is added on top of the price, orinclusive, where the price already includes tax. If you leave outcalculation, tax is automatic, and an order turning tax on takes the price mode in yourtax.default_price_modesetting,additiveunless you change it. Subscription orders are always additive. If you sendcalculation, both fields are required.tax.taxableis required on every ad-hoc line item and charge with an amount once tax is on. Missing request input returnsINVALID_REQUESTwith detail codeREQUIREDat its request path. Missing input on a stored line item or charge returns409 ACTION_NOT_ALLOWEDwith reasonconfiguration_requiredand the component inresource_typeandresource_id. A line item or charge withtaxable: falseowes no tax.line_item_tax_categoryclassifies a taxable line item. It's optional and defaults to the Tax category for new orders in your tax settings, as it was when the order was created. See Tax categories.
To turn tax off, send {"tax": {"enabled": false}} with no calculation, location, or exemption. Sending enabled: false with any of them is rejected.
Catalog line items#
A line item added with variant_id takes its taxability and category from that variant when it's added. A variant that doesn't set taxability is taxable. A line added with bundle_id takes the taxability and category shared by all its component variants. The components must share both stored values: an unset category means the merchant default and equals only another unset category. Bundles have no separate tax settings. Lines already sold keep their recorded tax treatment.
Bundle create or component replacement compares each component with the first in the request. Mixed values return 400 INVALID_REQUEST with a NOT_ALLOWED detail at each differing components[index].variant_id, naming taxable or line_item_tax_category. A variant or product change that would make a containing bundle mixed returns 409 ACTION_NOT_ALLOWED with reason mixed_tax_treatment, retry mode none, and the bundles in blocking_resources. Adding an older mixed bundle to an order returns 409 ACTION_NOT_ALLOWED with reason configuration_required; give its components the same tax treatment before selling it.
New variants of a product_type: digital product store digital_goods when you omit line_item_tax_category. This applies when creating the product with default_variant or variants, and when adding a variant with POST /v1/products/{product_id}/variants. The category is returned on reads and stays editable. Explicit categories are preserved. Changing a product to digital fills only its variants' unset categories with digital_goods and advances their versions; it is refused if that would make a containing bundle mixed. Other existing variants keep their stored categories.
Sending tax.taxable or tax.line_item_tax_category on a catalog line item fails with 400 INVALID_REQUEST and detail code NOT_ALLOWED; set them on the variant instead. With external tax, send the catalog line item's tax.calculation as you would for any other line item.
Automatic tax#
Automatic tax calculates US sales tax, Canadian tax, and VAT and GST from where each item leaves and where it goes, the line items' categories, and your registrations. The rates come from a Quaderno account that Flint sets up for you.
Connect automatic tax#
Connect automatic tax with the API or in the Dashboard under Settings > Tax. Each sandbox has its own connection, so connect it in every sandbox where you test automatic tax, and again in live. Once connected, you can change the tax defaults, such as Calculate tax on new orders, through tax on PATCH /v1/settings.
After you connect, add a state by sending another registration; it syncs during the request. A registration collects tax from its start_date through its end_date, inclusive. You can set or remove the end_date of a scheduled or active registration, and delete a scheduled one. An active registration's number and start date are fixed: change the number by ending the registration and creating a new one.
Without an active connection, automatic tax fails instead of calculating zero. This includes a connection you turned off. These requests return 409 ACTION_NOT_ALLOWED with reason configuration_required and resource_type tax_connection:
- Creating an order with automatic tax on, whether you turn it on or Calculate tax on new orders does.
- Changing anything that affects tax on an order with automatic tax, such as its line items, charges, discounts, or tax location.
- Creating a checkout session for an order with automatic tax.
Turning on Calculate tax on new orders without an active connection fails the same way. These configuration refusals omit param. Read GET /v1/tax-connection for the status_reason, then connect with POST /v1/tax-connection/connect. Orders with tax off or with external tax don't need a connection.
Turn automatic tax off#
Turn automatic tax off with POST /v1/tax-connection/disconnect, or with Turn off automatic tax in Settings > Tax. The request must say what happens to the tax.default_enabled setting, which the Dashboard shows as Calculate tax on new orders:
turn_offswitches the setting off. New orders, checkout sessions, and subscription renewals that follow the setting are created without tax. Subscription renewals bill with no tax until you turn tax back on.keepleaves the setting on. Orders and checkout sessions that follow it are refused with409 ACTION_NOT_ALLOWEDand reasonconfiguration_requireduntil you reconnect, set tax on each order yourself, or turn the setting off. Subscription renewals are held and retried; buyers aren't charged and dunning doesn't start.
Neither value turns the setting on. If it was already off, disconnecting leaves it off.
curl -X POST https://api.withflintpay.com/v1/tax-connection/disconnect \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: disconnect-tax-001" \
-d '{"tax_default_behavior": "turn_off"}'
The response holds the tax_connection, which now reads not_connected with status_reason disconnected, and the settings, so you can see whether the default changed. See Tax connection for the request, the states that allow it, and the response.
Disconnecting changes existing work too:
- Open orders that use automatic tax and have calculated tax become tax
incomplete, unless their tax is already committed. - Orders with committed tax and invoices that already have issued tax still collect the tax they committed.
- Payment links that turn tax on explicitly are refused when a checkout session is created, whichever value you chose.
Your registrations stay as they are. To turn automatic tax back on, show the seller the current disclosure and send POST /v1/tax-connection/connect with a new seller_attestation. Connecting doesn't turn Calculate tax on new orders back on.
Change a registration number#
A scheduled or active registration keeps its number. To switch to a new one, end the old registration, then create the new one starting the next day:
Sales through December 31 use the old registration, and sales from January 1 use the new one. A gap between the two dates calculates zero tax in those days, and overlapping dates return 409 ALREADY_EXISTS. In the Dashboard, Replace number does both steps. See Change a registration number for retries and undoing the end date.
Create an order with automatic tax#
Create an order for two $24.00 mugs shipped to Irvine, California:
curl -X POST https://api.withflintpay.com/v1/orders \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Flint-Version: 2026-09-07" \
-H "Idempotency-Key: sales-tax-automatic-001" \
-d '{
"line_items": [{
"type": "custom",
"name": "Ceramic mug",
"quantity": 2,
"unit_price_money": {"amount": 2400, "currency": "USD"},
"fulfillment": {"requirement": "none"},
"tax": {"taxable": true, "line_item_tax_category": "physical_goods"}
}],
"tax": {
"enabled": true,
"calculation": {"mode": "automatic", "price_mode": "additive"},
"location": {
"address_source": "provided",
"address_type": "shipping_address",
"address": {
"line1": "200 Spectrum Center Drive",
"city": "Irvine",
"state": "CA",
"postal_code": "92618",
"country": "US"
}
}
}
}'
{
"data": {
"order_id": "ord_1kmn0aExample",
"line_items": [{
"order_line_item_id": "li_1kmn0aExample",
"name": "Ceramic mug",
"quantity": 2,
"subtotal_money": {"amount": 4800, "currency": "USD"},
"tax_money": {"amount": 372, "currency": "USD"},
"tax": {"taxable": true, "line_item_tax_category": "physical_goods"}
}],
"tax": {
"enabled": true,
"mode": "automatic",
"automatic_profile": "connected",
"status": "calculated",
"location": {
"address_source": "provided",
"address_type": "shipping_address",
"address": {
"line1": "200 Spectrum Center Drive",
"city": "Irvine",
"state": "CA",
"postal_code": "92618",
"country": "US"
}
}
},
"pricing_amounts": {
"subtotal_money": {"amount": 4800, "currency": "USD"},
"discount_money": {"amount": 0, "currency": "USD"},
"charge_money": {"amount": 0, "currency": "USD"},
"tax_money": {"amount": 372, "currency": "USD"},
"additive_tax_money": {"amount": 372, "currency": "USD"},
"inclusive_tax_money": {"amount": 0, "currency": "USD"},
"requested_tip_money": {"amount": 0, "currency": "USD"},
"total_money": {"amount": 5172, "currency": "USD"}
}
}
}
Irvine's combined rate is 7.75%, so the $48.00 of mugs owe $3.72. Flint recalculates whenever something that affects tax changes, and every order response carries the current result. Read the amounts from the response rather than computing them yourself.
Test automatic tax in a sandbox#
In a sandbox, the tax provider returns only state-level US rates, so an order to Irvine owes 7.25% instead of the 7.75% above, and an order to New York City owes 4% instead of its live combined rate of 8.875%. Live mode returns the full local rates. The exceptions are the provider's test ZIP codes, which return full local rates in a sandbox: 90049, 10128, 60611, 33132, and 33206. To test a city, county, or district rate, send one of them as the buyer's postal_code, with the state it belongs to.
Tax location#
Automatic tax needs a buyer location for every taxable item and charge that isn't taxed at its own fulfillment destination, as several stores or destinations describes. For the order's tax location, Flint uses the first of these that applies:
- The pickup store, when every taxable item is picked up at the same store, whether the buyer chose pickup at checkout or the order's fulfillments are pickups. A buyer who picks up doesn't need to give an address, and an address they already gave doesn't change the result.
- The order's
delivery_destination. - The recipient address of the order's taxable shipments, when they all go to one address.
- Your legal business address for dine-in orders, including payment links and QR Checkout. The order must include a
prepared_fooditem, and every item must have fulfillment set tonone. A buyer's billing ZIP does not change the tax. tax.location, an address you provide.- The customer's default billing address (the saved address marked
is_default_billing), then their default shipping address. Subscription orders check the shipping address first. - The original Checkout tax address or postal code, for subscription orders with a completed signup order that recorded a supplied location for automatic tax.
An order with none of these waits in tax.status: requires_location, and a payment for it fails with ACTION_NOT_ALLOWED with reason configuration_required until you supply one.
When the order ships to an address, set delivery_destination and Flint taxes it there. If you need to supply the tax location yourself, send tax.location with address_source: provided in either of two forms:
{
"tax": {
"location": {
"address_source": "provided",
"address_type": "billing_address",
"address": {
"line1": "200 Spectrum Center Drive",
"city": "Irvine",
"state": "CA",
"postal_code": "92618",
"country": "US"
}
}
}
}
address_type is billing_address, shipping_address, or tax_address. line1, city, and country are required, and country is an ISO 3166-1 alpha-2 code. state is required for US and Canadian addresses. postal_code is required everywhere except Ireland, where addresses often have no Eircode. Automatic tax covers the countries and categories in the tax connection's coverage; use external tax outside it.
{
"tax": {
"location": {
"address_source": "provided",
"address_type": "postal_code",
"address": {"postal_code": "92618", "country": "US"}
}
}
}
A ZIP code is five digits or ZIP+4 with a hyphen, such as 92618-1234. Flint resolves its state to check state-limited exemptions, too. When a ZIP code alone isn't enough to place the buyer, the order moves to requires_location; send the full address in a later update.
Flint checks the location before it calculates:
- A malformed ZIP code, or a ZIP code in a different state than
state, fails with400 INVALID_REQUESTon the postal code. An address that can't be found fails on the address.error.paramnames the field, such astax.location.address.postal_codeordelivery_destination.address.postal_code. Correct the address and send it again. - A US delivery destination without a state or ZIP code fails with
400 INVALID_REQUESTand detail codeREQUIRED, on the missing field. - A country or category outside automatic-tax coverage fails with
400 INVALID_REQUESTand detailINVALID_VALUEon the country or line item category. Readcoverageon the tax connection, or use external tax. Stored unsupported input returns409 ACTION_NOT_ALLOWEDwith reasonconfiguration_required. - A location the connection has no rate for fails with
400 INVALID_REQUEST, and the message names the location. Use external tax for that order. - Military mail and US territories. Use
country: USwith military state codesAA,AE, orAP, or territory codesPR,GU,VI,AS, orMP, and the matching ZIP code. Goods sent to military mail addresses calculate zero tax. Goods sent to a territory without an effective registration also calculate zero tax. Service categories retain their seller-origin tax rules. Automatic tax does not support registered territory taxes on goods: the error names the territory, and you must use external tax for that order. - A state where you aren't registered calculates zero tax:
tax.statusiscalculatedandpricing_amounts.tax_moneyis zero. So does a state whose registration isn't in effect on the sale's date, because it hasn't started yet or itsend_datehas passed.
Several stores or destinations#
Flint calculates each part of an order from where it leaves to where it goes, with a separate tax calculation for each part. One order can ship from more than one warehouse, ship to more than one address, pick up at more than one store, and mix shipped, picked-up, and unfulfilled items.
- Fulfilled goods are taxed from the location that fulfills them to their destination: the buyer's address for a delivery choice made at checkout, or the store for a pickup, which is both the origin and the destination. A line item fulfilled from two locations, or through two delivery choices, is calculated in two parts, each with its share of the quantity and amount. A line item whose units can't be divided between its fulfillments, such as a bundle whose components ship from different locations, is calculated as one part from your legal address.
- Services and items without a fulfillment are taxed from your legal address to the order's tax location. A taxable service sold with shipped or picked-up goods takes your legal address, and the goods take the location they leave from.
- Charges take the origin and destination of the fulfillment they belong to, such as a delivery charge and its shipment. A charge without one, or whose fulfillment leaves from more than one location, takes your legal address. Its destination is still its fulfillment's, or the order's tax location.
- Shipments to different addresses are each taxed at their own recipient address. Other fulfillments without a store, such as local deliveries, are taxed at the order's tax location.
tax.location is the order's tax location, found by the usual precedence; items picked up at more than one store don't make any one store the order's location. It's omitted when every taxable item and charge is taxed at its own fulfillment destination and those destinations differ, such as items picked up at two stores. A tax.location you provide is kept, and when the destinations agree, tax.location is set as for any other order. Each calculation's origin and destination appear in the tax reports as seller_origin.* and buyer_destination.*.
Each calculation commits and is collected as payments in parts describes, and refunds reverse each payment's share.
Delivery charges follow the items they deliver#
tax.delivery_charge_tax_basis in settings controls automatic tax on charges created by shipment, local delivery, and pickup methods:
| Value | Delivery charge tax basis |
|---|---|
full_charge | The full delivery charge. This is the default. |
taxable_items_share | The share of the charge attributable to taxable merchandise in its fulfillment group. |
With taxable_items_share, Flint multiplies the charge after discounts by discounted gross taxable merchandise divided by discounted gross all merchandise in that group, then rounds half up to the currency's smallest unit. For example, a $9 delivery charge on equal-value taxable and nontaxable items has a $4.50 tax basis. The remaining $4.50 is nontaxable. A group with no taxable merchandise owes no delivery tax and needs no tax-provider call for that charge.
A method's taxable: false takes precedence, and its charge_tax_category stays the same. Charges you add directly to an order still use the full charge. External tax uses your components and delivery charge template.
You can save either value now. Until Flint enables this capability, calculations continue to use the full charge. Once enabled, open orders pick up the saved setting at their next calculation. Committed tax keeps the basis and amounts it used, including through payment holds, release, reporting, and refunds. This setting does not derive delivery taxability from destination-specific rules.
Canada coverage#
Canada supports digital_goods, software, and saas; the tax connection's coverage lists Canada with category_scope: digital. Taxable physical goods, services, and professional_services to Canada are unsupported and refused before calculation, even when you have a Canadian registration. A category in the request returns 400 INVALID_REQUEST with detail INVALID_VALUE and param naming the line item's line_item_tax_category; a stored category returns 409 ACTION_NOT_ALLOWED with reason configuration_required. Use external tax for those orders. Prices and tax amounts stay in USD.
Add a federal registration with country: CA and omit state for GST/HST. Add a separate provincial registration for BC or SK PST, MB RST, or QC QST. GST/HST and provincial tax each require their own registration in effect on the sale's date; a missing, future, or ended registration zeroes only its own tax. See Tax registrations.
Taxable charges on Canadian automatic-tax orders are unsupported, including service_fee. They return 400 INVALID_REQUEST with detail NOT_ALLOWED and param naming the charge. Set the charge's taxable: false, or use external tax for the order. Untaxed charges remain allowed.
Flint checks that the postal code's province matches the address. Canadian business numbers don't automatically grant B2B relief. Add seller registration numbers to settings.tax_identity to print them on invoices.
EU, UK, Australia, and New Zealand coverage#
Automatic tax calculates VAT for the 27 EU member states and the UK, and GST for Australia and New Zealand, on digital_goods, software, and saas. The connection's coverage lists each of these countries with category_scope: digital. Prices and tax amounts stay in USD.
For a walkthrough of VAT and GST registrations, buyer VAT numbers, reverse charge, and VAT invoices, see VAT, GST, and international tax.
Lines in these categories fail with 400 INVALID_REQUEST, detail INVALID_VALUE, and param naming the line item's category; use external tax for them:
- Physical goods. The tax provider can't apply the import thresholds for low-value goods.
servicesandprofessional_services. The tax provider treats them as supplied where you are, not where the buyer is.
Taxable charges fail with 400 INVALID_REQUEST, detail NOT_ALLOWED, and param naming the charge. Set the charge's taxable: false, or use external tax.
Add one registration per scheme, and omit state:
EU, with your non-Union OSS number:EUfollowed by nine digits. One registration covers all 27 member states.GB,AU, orNZ, with your national VAT or GST registration number.
A covered country without a registration in effect on the sale's date calculates zero tax, as an unregistered US state does. Automatic tax records Quaderno's non-taxable answers for places where you are not registered, including the Canary Islands, Åland, Guadeloupe, Martinique, Réunion, Guyane, Mayotte, Büsingen, and Livigno. Each sale records one row: vat for EU member states and the UK, gst for Australia and New Zealand. The row's jurisdiction is the country, with its ISO code, such as DE, and English name, such as Germany, at level country.
For EU and UK sales, Flint keeps the buyer's billing country as private location evidence on the order's tax record: the billing-address tax location's country, otherwise the customer's billing address country. It doesn't change the calculation, never blocks a sale, isn't returned by the API, and is erased when the customer is deleted. Card-issuing country and IP country aren't recorded yet.
Before issuing a UK or EU VAT invoice, set settings.tax_identity.legal_name, registered_address, and tax_ids with the seller's VAT number. Use a GB VAT entry for UK VAT. For EU VAT, use an EU member state's VAT entry or an EU entry with identifier_type: oss for an OSS number. Automatic tax registrations do not populate these document details. Flint refuses to issue the invoice with configuration_required and a next action to update /v1/settings when the seller details are missing. Drafts can still be saved.
Reverse charge for business buyers#
For a destination in the EU, the UK, Australia, or New Zealand, Flint sends the customer's tax ID to the tax provider. Flint uses one buyer tax ID per order, and items going to a country where that ID doesn't apply are charged tax. It picks the customer's tax_identity.tax_ids entry for the country of the order's tax location, or of the first item's destination when the order has none (a Greek EL VAT ID counts as GR). For an EU country without one, it picks the first entry from an EU country. An EU VAT ID applies to every EU destination; a UK, Australian, or New Zealand ID applies only to its own country. Flint sends an entry only when it's a VAT or GST registration in that country's format:
| Country | identifier_type | value |
|---|---|---|
| EU member states | vat, eu_vat, or the country code plus _vat, such as de_vat | The VAT number with its country prefix, such as DE123456788; Greece uses EL |
| United Kingdom | vat or gb_vat | GB and the VAT number |
| Australia | abn, au_abn, gst, or au_gst | An 11-digit ABN with a valid check digit |
| New Zealand | gst or nz_gst | An 8- or 9-digit GST number with a valid check digit |
Spaces, dots, and hyphens are ignored. If a tax ID isn't one of these VAT or GST types, or doesn't match its country's format, Flint charges tax as for a consumer. That covers personal IDs such as an Italian codice fiscale or a Portuguese NIF, and mistyped numbers. Guest orders and customers without a matching ID are charged tax too. The tax provider can also reject an EU VAT number with an invalid check digit and charge VAT as for a consumer.
To test in sandbox, enable automatic tax and add an EU registration that covers Germany, such as EU OSS. Save the example DE123456788 as an eu_vat tax ID on a customer, then calculate automatic tax on a SaaS order for that customer with a German tax address. Check that tax.reverse_charge.customer_tax_id.value is DE123456788 and that the tax is zero.
When the provider applies reverse charge, the buyer accounts for the tax:
- The tax is zero, and
tax.statusstayscalculated. - Each row has
taxability_reason: reverse_charge,percent: 0, and the full taxable amount. - On a tax-inclusive order, the buyer pays the same price, and none of it is tax: the whole price is the net.
tax.reverse_charge.customer_tax_idrecords the tax ID Flint sent. It's frozen once the order is paid; recalculating tax before payment reads the customer's current tax IDs again.
"reverse_charge": {
"customer_tax_id": {"country": "DE", "region": null, "identifier_type": "eu_vat", "value": "DE123456788"}
}
tax.reverse_charge is null when no reverse charge applies. An exemption and a reverse charge never apply to the same order: when an exemption applies, Flint calculates no tax and sends no tax ID, so the order is exempt and tax.reverse_charge is null. Verify that a buyer's tax ID is registered before you save it on the customer. Use the EU's VIES service, HMRC's VAT number checker, or ABN Lookup. Hosted checkout doesn't collect tax IDs; set them on the customer. Issued invoices freeze the reverse charge, and the invoice PDF and its credit notes print "Reverse charge" with the buyer's tax ID. See Tax on an invoice.
Tax categories#
line_item_tax_category takes one of twelve values. US automatic tax supports eight of them. Outside the US, automatic tax supports digital_goods, software, and saas only. The tax provider cannot express the state-specific taxability, exemptions, thresholds, and rates for food, clothing, medical_goods, and admission, so automatic tax rejects them with 400 INVALID_REQUEST on the category when it calculates the order; use external tax for those items. While automatic tax is connected, PATCH /v1/products/{product_id}/variants/{variant_id} rejects these categories for taxable variants with 400 INVALID_REQUEST and a NOT_ALLOWED detail on line_item_tax_category. The same error applies when marking a variant with one of these categories taxable.
| Category | Automatic tax |
|---|---|
general, physical_goods | Taxed as general goods |
prepared_food | Taxed at the general rate; rates specific to prepared food or restaurant meals aren't applied |
digital_goods | Taxed as electronically supplied services |
software, saas | Taxed as software as a service |
services, professional_services | Taxed as consulting services in the US; unsupported elsewhere |
food, clothing, medical_goods, admission | Not supported by the tax provider; use external tax |
Charges take a separate charge_tax_category: service_fee, shipping, delivery, handling, or surcharge. US automatic tax calculates all five at the general rate at the charge's location. Paid pickup uses service_fee by default and is taxed at the store. A charge that leaves the category out takes it from its type: delivery_fee is delivery, shipping_fee is shipping, service_fee is service_fee, and handling_fee is handling. Other types, including setup_fee and other, need an explicit category when taxable, or calculation fails with 400 INVALID_REQUEST and detail code NOT_ALLOWED. Set charge_tax_category, set taxable: false, or use external tax. See Tax a charge.
The tax provider has no dedicated prepared-food or shipping classification. Taxable shipping and delivery use the general rate. A shipment method's tax_exempt_us_states lists the US destinations where the merchant's shipping charge is exempt. For example, use ["CA"] for a method whose separately stated common-carrier shipping qualifies for California's at-cost exemption. Other destinations follow the method's taxable setting or the merchant default. Use external tax when eligibility depends on the order's contents or terms that vary by shipment.
Tax-inclusive prices with automatic tax#
Set the order's tax.calculation.price_mode to inclusive when your prices already include tax. Every line item and charge on the order is then tax-inclusive: the buyer pays the prices you entered, and Flint works out the tax inside them. To make inclusive the mode for orders that turn tax on without their own calculation, including checkout and payment link orders, set tax.default_price_mode in settings. Subscription orders, including renewals, stay additive.
Flint calculates each part on its own: each line item and charge, and each fulfillment part of a line item that ships from or goes to several stores or destinations. For each part, Flint takes its price after pre-tax discounts and gets the rates for that amount from the tax connection. Then:
- The effective rate is the primary rate times its taxable percentage, plus any additional rate times its taxable percentage, both divided by 100.
- The tax is the price × effective rate ÷ (100 + effective rate), rounded half up to the currency's smallest unit.
- The primary tax is its share of the effective rate, rounded half up, and any additional tax takes the rest.
A $10.85 item at 8.5% includes $0.85 of tax: 1085 × 8.5 ÷ 108.5 = 85 cents. Its tax_money is $0.85, net_money stays $10.85, and pricing_amounts.inclusive_tax_money includes the $0.85. The order's total is what you charged. Each part is rounded on its own: a $20.00 line at 8.5% includes $1.57 of tax, but split into two $10.00 parts it includes $0.78 + $0.78 = $1.56. In the tax reports, gross_money is the price less the tax it includes, and that amount is split into taxable_money and nontaxable_money by the taxable percentage, rounded half up.
A reverse-charged item on a tax-inclusive order contains no tax: the buyer pays the same price, its tax_money is zero, and the whole price is the net. See Reverse charge for business buyers.
The price mode applies to the whole order and is part of its committed tax: after a payment, changing it returns 409 ACTION_NOT_ALLOWED with reason payment_collected.
Post-tax discounts#
A discount with discount_calculation_basis: subtotal_post_tax lowers what the buyer owes but not the tax: Flint calculates the tax on the price before the discount. A $2.00 post-tax discount on a $10.00 item taxed at 8.5% leaves the tax at $0.85, so the buyer pays $8.85. The same discount with subtotal_pre_tax lowers the taxed amount to $8.00, so the tax is $0.68 and the buyer pays $8.68.
A post-tax discount can be more than its items' price before tax, up to what they cost with their tax. A post-tax percentage promotion is priced on the tax the order owes now, so it follows the tax: on renewals and invoices, and down to zero when the order becomes exempt, has nothing taxable, or waits for a tax location. It keeps its amount on a tax-inclusive order, whose prices already include the tax, once a payment commits the tax, and when you set tax.enabled: false. The next discount change prices it again.
In tax_transactions_itemized_v2, post_tax_discount_money holds each collection's share of post-tax discounts. tax_transactions_itemized_v1 has no column for them: its rows keep the calculated amounts, so their total_money is more than was collected by the post-tax discount.
Manual capture#
An order with automatic tax can be paid with a manual-capture leg: authorize now, capture later.
- Flint checks uncommitted tax when the hold is placed. Tax already committed by an earlier payment or invoice keeps its original calculation.
- Capturing never recalculates tax or changes its original date.
- A partial capture is the final bill for the authorization. The captured money carries its allocated share of the tax.
- A hold that is canceled or expires before any capture collected nothing. When no other payment or issued invoice retains committed tax, the next payment needs a fresh calculation.
- The capture deadline in
authorization_expires_atstill applies.
What automatic tax doesn't support#
Automatic tax refuses an order it can't calculate correctly, instead of guessing. Use external tax for these orders. Each of them returns 400 INVALID_REQUEST when the request carries the input. When the input is already stored on the order, such as a line item's category, the refusal is 409 ACTION_NOT_ALLOWED with reason configuration_required:
- Physical goods,
services, orprofessional_servicesto a buyer outside the US. - Taxable charges on orders to a buyer outside the US. Set the charge's
taxable: false, or use external tax for the order.
A pickup store whose address has no country or postal code can't be taxed. Choosing it fails with ACTION_NOT_ALLOWED with reason configuration_required, which names the location to fix.
Tips are never taxed. Adding, changing, or clearing a tip leaves the order's tax as it is.
Supply external tax components#
With external tax, your tax engine decides the rates and Flint applies them. Send the result as components in each line item's and charge's tax.calculation. Each component is one jurisdiction's tax: a country, province, US state, county, city, or district.
Create an order for a $37.00 ceramic pour-over set taxed at Washington's 6.5% state rate and Seattle's 3.85% local rate:
curl -X POST https://api.withflintpay.com/v1/orders \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Flint-Version: 2026-09-07" \
-H "Idempotency-Key: sales-tax-external-001" \
-d '{
"line_items": [{
"type": "custom",
"name": "Ceramic pour-over set",
"quantity": 1,
"unit_price_money": {"amount": 3700, "currency": "USD"},
"fulfillment": {"requirement": "none"},
"tax": {
"taxable": true,
"calculation": {
"price_mode": "additive",
"components": [
{
"jurisdiction": {"code": "US-WA", "country": "US", "state": "WA", "level": "state", "name": "Washington"},
"tax_type": "sales_tax",
"calculation_type": "percentage",
"percent": 6.5
},
{
"jurisdiction": {"code": "US-WA-SEATTLE", "country": "US", "state": "WA", "level": "city", "name": "Seattle"},
"tax_type": "sales_tax",
"calculation_type": "percentage",
"percent": 3.85
}
]
}
}
}],
"tax": {
"enabled": true,
"calculation": {"mode": "external", "price_mode": "additive"}
}
}'
{
"data": {
"order_id": "ord_1kmn0aExample",
"line_items": [{
"order_line_item_id": "li_1kmn0aExample",
"name": "Ceramic pour-over set",
"subtotal_money": {"amount": 3700, "currency": "USD"},
"tax_money": {"amount": 383, "currency": "USD"}
}],
"tax": {
"enabled": true,
"mode": "external",
"status": "calculated",
"tax_breakdowns": [
{
"tax_breakdown_id": "txb_1kmn0aExample",
"order_line_item_id": "li_1kmn0aExample",
"jurisdiction": {"code": "US-WA", "country": "US", "state": "WA", "level": "state", "name": "Washington"},
"tax_type": "sales_tax",
"calculation_type": "percentage",
"price_mode": "additive",
"percent": 6.5,
"taxable_money": {"amount": 3700, "currency": "USD"},
"tax_money": {"amount": 241, "currency": "USD"},
"taxability_reason": "standard_rated"
},
{
"tax_breakdown_id": "txb_2kmn0aExample",
"order_line_item_id": "li_1kmn0aExample",
"jurisdiction": {"code": "US-WA-SEATTLE", "country": "US", "state": "WA", "level": "city", "name": "Seattle"},
"tax_type": "sales_tax",
"calculation_type": "percentage",
"price_mode": "additive",
"percent": 3.85,
"taxable_money": {"amount": 3700, "currency": "USD"},
"tax_money": {"amount": 142, "currency": "USD"},
"taxability_reason": "standard_rated"
}
]
},
"pricing_amounts": {
"subtotal_money": {"amount": 3700, "currency": "USD"},
"tax_money": {"amount": 383, "currency": "USD"},
"additive_tax_money": {"amount": 383, "currency": "USD"},
"inclusive_tax_money": {"amount": 0, "currency": "USD"},
"total_money": {"amount": 4083, "currency": "USD"}
}
}
}
Each component becomes a row in tax.tax_breakdowns. Flint rounds each additive row half up to the cent: 6.5% of $37.00 is $2.405, which rounds to $2.41, and 3.85% is $1.4245, which rounds to $1.42.
- Every line item and charge with an amount needs its own
tax.calculationwith at least one component, including those withtaxable: false, whose components record nontaxable sales by jurisdiction. A missing calculation or missing components in the request returnsINVALID_REQUESTwith detail codeREQUIRED. Missing stored input returns409 ACTION_NOT_ALLOWEDwith reasonconfiguration_requiredand the affected component reference. - A line item's or charge's calculation has only
price_modeandcomponents. The order'stax.calculation.modesets the mode for the whole order. Line items and charges return their calculation while the order uses external tax. - The price mode is per line item and charge. The order's
price_modeapplies only to flat order taxes. - Tax applies to the amount after discounts. A line item's taxable amount is its price, including modifiers, minus the discounts applied to it. A charge is taxed on its
applied_money.
Tax delivery charges#
The buyer picks a delivery option after you create the order, so the delivery charge doesn't exist yet when you send tax. Set tax.delivery_charge_calculation on the order instead. It has the same price_mode and components as a charge's tax.calculation, with percentage components only and mode left out or external. Flint copies it onto every positive delivery charge a selection creates, including a paid pickup, and applies the percentages to the charge's applied_money, whichever option the buyer picks. You can also send the template with delivery in POST /v1/orders to create the order and select delivery together. Include delivery tax in delivery.expected_amount_money.
Bind your tax quote to the delivery address. When you supply external components for an order the buyer will ship or have delivered through Checkout, send the full address you used to calculate them in tax.location.address with tax.location.address_type: "tax_address". The buyer can pay once the selected delivery address matches the quote. If the address changes, Checkout leaves tax incomplete and asks the buyer to change the address or contact you.
Watch order.updated for changes to delivery_destination.address when tax.status is incomplete. To keep the new address, update tax.location and send replacement calculations for the whole order in the same request. Update the existing delivery charge through tax.charge_calculations and update tax.delivery_charge_calculation for future selections. The buyer can review the updated total in Checkout before paying. To calculate tax automatically when the buyer changes address, use a tax calculation callback.
curl -X PATCH https://api.withflintpay.com/v1/orders/ord_1kmn0aExample \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Flint-Version: 2026-09-07" \
-d '{
"tax": {
"delivery_charge_calculation": {
"price_mode": "additive",
"components": [{
"jurisdiction": {"code": "US-WA", "country": "US", "state": "WA", "level": "state", "name": "Washington"},
"tax_type": "sales_tax",
"calculation_type": "percentage",
"percent": 6.5
}]
}
}
}'
- Set it on create or update. A new value replaces the old one, and
nullclears it. The same validation as for a charge's calculation applies, witherror.paramundertax.delivery_charge_calculation. - It applies when a charge is generated. Changing or clearing the template later doesn't change charges already on the order. To change one, send its calculation in
tax.charge_calculations, naming the generated charge byorder_charge_id, as for any other charge. - A new selection starts over. Selecting again creates the delivery charges again, so overrides are dropped and the template applies again. Releasing a selection removes its charges.
- Only external tax with provided components uses it. Responses include it only while the order uses external tax. On a callback order, your callback taxes each generated charge by its
order_charge_id, and sending the template returns400 INVALID_REQUESTwith detail codeNOT_ALLOWED. Switching to automatic tax, or turning tax off, clears it in the same update. Sending it while tax is automatic or off fails with400 INVALID_REQUESTand detail codeNOT_ALLOWED. - The rate callback and the selection request carry no tax. The template, or your tax calculation callback on a callback order, is the only source of tax for a generated delivery charge.
- Publishing paid methods requires it. When a checkout session, payment link, or invoice checkout can offer a method that charges in the order's currency, an external-tax order with provided components needs the template first. A callback order doesn't. Otherwise the request fails with
400 INVALID_REQUESTand detail codeREQUIRED, so a buyer never reaches a paid option Flint can't tax. See Delivery options.
If the order has no template when the buyer selects, the selection still succeeds, but the charge has no calculation and the order's tax status is incomplete. Payment and checkout confirmation return 409 ACTION_NOT_ALLOWED with reason configuration_required, naming the charge, until you set the template and the buyer selects again, or send the charge's calculation in tax.charge_calculations.
Switching an order that already has a paid delivery selection to external tax treats the generated charge like any other: send its calculation in tax.charge_calculations in the same request, or the update fails and names it.
Once the order has an invoice, the template and tax.charge_calculations are part of its frozen financials. Set the template before you issue.
Component fields#
jurisdictionobjectRequiredThe taxing authority. Send code, your stable identifier up to 128 letters, digits, and ., _, :, or -, starting with a letter or digit; country, an ISO 3166-1 alpha-2 code; level, one of country, province, state, county, city, or district; and name, the display name. state level is US-only. province is a first-level subdivision outside the US.
For US jurisdictions, send a two-letter state at every level. Outside the US, omit state at country level, and send it for province and lower levels as the ISO 3166-2 suffix: 1 to 3 uppercase letters or digits, such as ON or ENG. Flint returns code exactly as you sent it, so you can group report rows by it.
tax_typestringRequiredsales_tax, use_tax, vat, gst, hst, pst, or qst for a percentage. hst, pst (including Manitoba RST), and qst require country: CA. retail_delivery_fee is the only flat order tax.
calculation_typestringpercentage, the default on line items and charges, or flat_amount, the default on the order.
percentnumberThe rate in percentage points, from 0 to 100 with up to four decimal places: 6.5 is 6.5%. Required for a percentage.
flat_moneyMoneyThe fixed amount of a flat order tax, positive and in the order's currency.
Two components on the same line item or charge can't share a jurisdiction code, tax_type, and calculation_type.
Reverse charge#
On a percentage component outside the US, you can send taxability_reason: reverse_charge with percent: 0. It is the only accepted input reason. Flint records a zero-tax breakdown with that reason; your tax engine decides whether reverse charge applies. A customer tax ID alone does not apply reverse charge in external mode. On an exempt order, the exemption applies instead: every row has taxability_reason: customer_exempt and tax.reverse_charge is null. Flint sets tax.reverse_charge with the customer's tax ID for the component's country, of any type or format (a Greek EL ID counts as GR; for an EU country without one, the first EU entry). customer_tax_id is null when the order has no customer or the customer has no tax ID for that country.
For example, supply this component for VAT accounted for by a UK business buyer:
{
"jurisdiction": {"code": "GB", "country": "GB", "level": "country", "name": "United Kingdom"},
"tax_type": "vat",
"calculation_type": "percentage",
"percent": 0,
"taxability_reason": "reverse_charge"
}
Foreign tax uses the order's USD currency. Flint preserves the tax type and jurisdiction in order breakdowns, invoice snapshots, refunds, and row-based tax reports. The reverse-charge reason remains in order breakdowns and invoice documents; tax CSV reports do not include a taxability-reason column. Issued invoices also state EU and UK VAT in local currency. You remain responsible for registration and filing.
Tax-inclusive prices#
Set a line item's or charge's price_mode to inclusive when its price already includes tax. The buyer pays the price you entered, and Flint works out the tax inside it:
price_mode | Price | taxable_money | tax_money | Buyer pays |
|---|---|---|---|---|
additive | $10.00 | $10.00 | $0.65 | $10.65 |
inclusive | $10.65 | $10.00 | $0.65 | $10.65 |
Both rows use one 6.5% component. For an inclusive price, Flint rounds the combined tax half up to the cent, splits it across the components in proportion to their rates, and sets taxable_money to the price minus the tax. Inclusive and additive line items and charges can share an order.
Flat taxes on the order#
Some states charge a flat fee per order, such as Colorado's retail delivery fee. Send it as a component in the order's own tax.calculation, not on a line item:
{
"tax": {
"enabled": true,
"calculation": {
"mode": "external",
"price_mode": "additive",
"components": [{
"jurisdiction": {"code": "US-CO", "country": "US", "state": "CO", "level": "state", "name": "Colorado"},
"tax_type": "retail_delivery_fee",
"calculation_type": "flat_amount",
"flat_money": {"amount": 29, "currency": "USD"}
}]
}
}
}
- An order component must be
flat_amountwithtax_type: retail_delivery_fee, and the order'sprice_modemust beadditive. - Flint adds the full
flat_moneyonce, as a row with noorder_line_item_id, while the order has a taxable amount. When nothing on the order is taxable, or an exemption applies, the row is left off. - Sending the order's
tax.calculationagain replaces its components. To keep the fee, include it each time. - You decide when the fee applies and how much it is. Flint doesn't keep statutory fee tables.
Tax-exempt customers#
An exempt sale gets zero tax in automatic and external mode. The order's tax.status is exempt, every line item and charge has zero tax_money, and tax.exemption records the exemption that applied. This covers orders, checkout sessions, invoices, and subscription renewals under the merchant's tax defaults.
For resale and exemption certificates, wholesale buyers, and exempt products, see Tax exemptions and resale certificates.
Automatic tax needs no buyer location for an exemption that covers all states. Flint skips the tax calculation and charges no automatic tax fee. For external tax, send components as usual; their rows have zero tax_money and taxability_reason: customer_exempt, and flat order taxes are left off.
Choose the exemption#
Set tax.exemption when you create or update an order. Its type is one of:
type | Meaning |
|---|---|
customer | The default. A customer with tax_exempt: true is exempt everywhere. Otherwise Flint looks for one of the customer's exemption records that applies. |
order | A one-off declaration for this order. Send reason and coverage. certificate_number, description, and evidence_reference are optional, except that reason: other requires a description. |
none | Tax the order, even when the customer is exempt. |
{
"tax": {
"enabled": true,
"exemption": {
"type": "order",
"reason": "resale",
"coverage": {"type": "states", "country": "US", "states": ["TX"]},
"certificate_number": "RESALE-1234",
"evidence_reference": "merchant-records/resale-1234.pdf"
}
}
}
An order declaration takes the same reason values and coverage shapes as a customer exemption record: all_states, or a states list of 1 to 60 US state codes. description follows the same rule as on a record: it is required when reason is other, optional for every other reason, and limited to 500 characters. A missing description for other fails the same validation as it does on a record. Subscription renewals always use customer.
Once the order's tax commits, changing tax.exemption returns 409 ACTION_NOT_ALLOWED with reason payment_collected. Tax commits when a payment is collected, when an invoice for the order is issued, and when a return replacement is confirmed and its prices freeze.
Which exemption applies#
An exemption covers a taxable destination when its coverage contains that destination and the date of the calculation falls within its dates. Start and end dates are inclusive, in your merchant timezone. If any taxable destination falls outside its coverage, the whole order is taxed.
- Automatic tax compares the state of the destination Flint calculates tax for: the delivery destination, the fulfillment location, or the tax location.
- External tax compares the
stateof each component'sjurisdiction. - All states needs no location. A list of states can leave the order in
requires_locationuntil the order has a location to compare. - Several matches. The record with the latest
start_dateapplies, and when start dates tie, the newest record. - One exemption applies to the whole order. It applies only when it covers every destination the order is taxed for.
The exemption snapshot#
tax.exemption is read-only on the order and records what applied at the latest calculation. It freezes when the order's tax commits.
A response returns the latest exemption assessment in tax.exemption. Read tax_exempt to tell whether the order is exempt. Flint keeps the selection: an order declaration that doesn't cover the order's destination stays on the order, and its assessment has tax_exempt: false until it applies. To change the selection, send the whole tax.exemption again.
| Field | Meaning |
|---|---|
source | Where Flint assessed the exemption: customer for the customer's flag or records, order for an applied order declaration, or none when no source was assessed. A customer assessment can have tax_exempt: false. |
tax_exempt | Whether the assessment exempts the order. Read this field to decide whether an exemption applied. |
customer_tax_exemption_id | The customer's exemption record that applied, when one did. |
reason, coverage, certificate_number, start_date, end_date | Copied from the exemption record or order declaration. |
evidence_reference | Where you keep the certificate. Only merchant reads include it. Buyers never see it. |
An issued invoice keeps its own copy in snapshot.tax_exemption. The buyer's copy omits evidence_reference, and the invoice PDF and receipt show a "Tax exempt" row with the reason and certificate number. See Tax on an invoice.
When an exemption expires#
An exemption stops applying at the first calculation after its end_date, so a renewal calculated after that date is taxed. Flint also stops applying an archived record. Flint checks the exemption again before an order's first payment, because an order can be calculated well before it is paid. Starting a payment doesn't lock the exemption in. A payment attempt that Flint has accepted but that isn't confirmed yet is checked again immediately before its first confirmation or authorization, including an attempt the buyer resumes. Once an authorization is established, capturing it later works as usual: a later capture doesn't invalidate or reprice the payment.
If the record expired, was archived, or changed before the first payment, or the customer's tax_exempt flag is now false, Flint refuses the payment. What you do next depends on the resource:
- An ordinary unpaid order. The payment is refused with
409 ACTION_NOT_ALLOWEDand reasonconfiguration_required. Flint recalculates the order's tax without the exemption. Read the new tax and total, then start payment again. - An issued invoice. The invoice keeps its frozen amounts, and Flint doesn't reprice it. To charge different tax, void it, then create and issue a new invoice for the order. Issuing recalculates tax.
- A confirmed exchange or replacement. Its prices are frozen, so Flint doesn't recalculate or reprice it. Paying the balance is refused with the same
409 ACTION_NOT_ALLOWEDand reasonconfiguration_required, including when a payment attempt reaches its first confirmation or authorization after the exemption stopped holding. If Flint already accepted an unconfirmed payment attempt, the refusal leaves it open, and Flint doesn't cancel it for you. If one is open, cancel that attempt withPOST /v1/orders/{order_id}/payment-attempts/{order_payment_attempt_id}/cancel. Resolution cancellation is blocked while an attempt is active. Then cancel the unpaid resolution, create a new resolution for the Return, and confirm the new one. Don't confirm the canceled resolution. An exchange or replacement with nothing for the buyer to pay is unaffected. - A sale already paid. The snapshot on the order or invoice stays as evidence of what applied. Expiry doesn't change past sales.
Switch an existing order to external tax#
When automatic tax refuses an order, switch it to external tax in one update: send the order's new tax.calculation and a calculation for each line item and charge in tax.line_item_calculations and tax.charge_calculations. Each entry names the line item or charge by ID:
curl -X PATCH https://api.withflintpay.com/v1/orders/ord_1kmn0aExample \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Flint-Version: 2026-09-07" \
-d '{
"tax": {
"calculation": {"mode": "external", "price_mode": "additive"},
"line_item_calculations": [{
"order_line_item_id": "li_1kmn0aExample",
"calculation": {
"price_mode": "additive",
"components": [{
"jurisdiction": {"code": "US-WA", "country": "US", "state": "WA", "level": "state", "name": "Washington"},
"tax_type": "sales_tax",
"calculation_type": "percentage",
"percent": 6.5
}]
}
}]
}
}'
- The update is all or nothing. If any line item or charge with an amount is left without a calculation, the update fails with
409 ACTION_NOT_ALLOWED, reasonconfiguration_required, for each stored component, identified byresource_typeandresource_id, and the order doesn't change. - Listed calculations replace the previous ones; unlisted ones stay. Send the same lists to rerate an external order, for example after its address changes.
- Line item and charge calculations exist only under external tax. Switching the order to automatic tax, or turning tax off, clears them in the same update. Sending one while the order's tax is automatic or off fails with
400 INVALID_REQUESTand detail codeNOT_ALLOWED. - The mode is fixed once the order is paid. After any payment, changing the mode or turning tax on or off fails with
ACTION_NOT_ALLOWEDwith reasonpayment_collected.
Read the tax result#
Every order response includes tax:
statusstringWhether the order's tax is ready. Payment requires calculated, exempt, or not_required.
modestringautomatic or external.
price_modestringadditive when tax is added to the order's prices, or inclusive when they include tax. This read-only field is optional because a response replayed for an idempotent retry of an earlier request omits it. It is present on every order Flint renders after 2026-10-20, with additive when no tax configuration is set. With automatic tax, this mode decides every line item's and charge's tax. With external tax, each line item and charge has its own mode in tax.calculation.price_mode, which decides that item's tax, and mixed modes can share an order. New values may be added.
locationobjectThe location Flint taxed, with its address_source: provided, fulfillment for a delivery destination or shipment, customer, location for a pickup store, or merchant for dine-in. Omitted when every taxable item and charge is taxed at its own fulfillment destination and those destinations differ, unless you provided one. See Several stores or destinations.
tax_breakdownsarrayWith external tax, one row per jurisdiction for each line item and charge, plus any flat order taxes. With automatic tax outside the US, one row per national or provincial tax for each applicable line item and charge. US automatic tax stays combined.
exemptionobjectThe exemption that applied, when there is one. See The exemption snapshot.
available_location_inputsarray["provided"] while the order needs a tax location, telling you to send tax.location.
components_sourcestringExternal tax only: provided when you send components, or callback when your tax calculation callback supplies them.
callback_evaluationobjectOn a callback order, the tax_calculation_evaluation_id and evaluated_at of the callback answer the order's tax uses. Absent until your callback answers, and while tax is requires_location or incomplete.
automatic_profilestringconnected for automatic tax from your tax connection. Orders calculated before automatic tax required a connection report standard.
tax.status is one of:
status on order taxInvalid tax input is rejected instead of saved. When the tax service can't be reached, the change fails with 502 EXTERNAL_SERVICE_ERROR and the order is left as it was; retry with backoff. An exhausted monthly automatic-tax budget returns 409 LIMIT_REACHED with reason monthly_tax_calculations. Wait for the budget to reset or use external tax. An automatic-tax provider or setup failure that needs repair returns 503 SERVICE_UNAVAILABLE with reason repair_required and retry none; use external tax or contact Flint support.
Reconcile jurisdictions#
External tax rows carry everything you need to reconcile by jurisdiction. Each has taxable_money and tax_money, the jurisdiction you sent, the percent or flat_money, the price_mode, and the order_line_item_id or order_charge_id it belongs to. Group by jurisdiction.code and display jurisdiction.name.
Outside the US, automatic tax returns one row per national or provincial tax for each applicable line item and charge. For US automatic tax, Flint keeps the combined state and local tax amount for each line item and charge. Use the tax transactions reports to reconcile those amounts.
Payments in parts#
An automatic tax order can be paid with a deposit and a balance, with several payment intents, with a gift card and a card, or with several partial manual payments. An invoice can collect through installments. You don't send anything extra, and the order's total tax doesn't change with the number of payments.
Flint commits an order's tax at the first payment it accepts: a payment intent, a recorded manual payment, or a gift card. An invoice commits it when it is issued. Committing keeps the calculation's tax amounts, jurisdictions, and tax date, so:
- Only uncommitted tax is revalidated. Before a payment that uses uncommitted tax, the calculation must be recent and from the same day. Recalculate it if that payment is refused. After that, later payments collect the same tax however many days or payments follow.
- Later payments don't depend on the connection. Committed tax keeps collecting after you change tax settings or disconnect automatic tax, the way an issued invoice does. Connecting or disconnecting doesn't mark an order with committed tax
incomplete. - Each payment carries its share of the tax. The tax is split across payments in proportion to what each one pays, and the shares add up to the committed amount.
- New items are calculated separately. A line item or charge added after the commitment gets its own calculation, which commits at its first payment. Calculations that are already committed stay as they were.
- Changing what was committed is refused. Changing a committed line item's or charge's amount, quantity, discounts, tax category, taxability, or tax location, or the order's price mode, returns
409 ACTION_NOT_ALLOWEDwith reasonpayment_collected, the same as external tax. When nothing is paid or authorized and no invoice is issued, the commitment is released and edits recalculate tax again. - Refunds reverse tax payment by payment. A refund returns the tax that its original payment collected, so refund each payment for what it covered. See Refund tax.
For an authorization captured later, see Manual capture. Its tax commits when the hold is placed.
Calculate external tax with your callback#
If your tax engine runs on your own server, register its endpoint as a tax calculation callback, select it in tax.calculation_callback_id, and set an order's tax.calculation.components_source to callback. Flint then asks your endpoint for every line item's and charge's components whenever the order changes in a way that would recalculate tax, instead of you sending them:
curl -X PATCH https://api.withflintpay.com/v1/orders/ord_1kmn0aExample \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Flint-Version: 2026-09-07" \
-d '{
"tax": {
"calculation": {"mode": "external", "price_mode": "additive", "components_source": "callback"}
}
}'
- Flint calls on every change that recalculates tax: line items, charges, discounts, the customer, the delivery destination, the tax location, and a delivery or pickup selection. It also calls before a payment starts when the order's last evaluation is more than 24 hours old.
- Your answer becomes the order's components. The response has the same
line_item_calculationsandcharge_calculationsshapes asPATCH /v1/orders/{order_id}, covering every line item and charge with an amount, plus optional flat order taxes. Flint validates it as it validates your own components and applies it whole or not at all. - Callback orders refuse components in requests. Sending components in the order's
tax.calculation, a line item's or charge'stax.calculation,tax.line_item_calculations,tax.charge_calculations, ortax.delivery_charge_calculationreturns400 INVALID_REQUESTwith detail codeNOT_ALLOWED. - Switching is one request. Switching to
callbackdrops the components you sent and calls your endpoint in the same request. Switching back toprovidedneeds every calculation in that request, as when switching to external tax. - The location resolves as for automatic tax. Without one,
tax.statusisrequires_locationand Flint calls nothing. - Identical inputs keep one evaluation.
tax.callback_evaluationnames thetax_calculation_evaluation_idthe order uses and when it was evaluated. Flint reuses a validated answer for identical inputs for 15 minutes. - No callback, no tax of Flint's own. When the order needs an evaluation and no active callback is selected, the request returns
409 ACTION_NOT_ALLOWEDwith reasonconfiguration_requiredandresource_typetax_calculation_callback. When your endpoint fails, times out, or answers badly, the change returns502 EXTERNAL_SERVICE_ERRORwith reasontax_callback_failedand the order is unchanged. Changes that keep an order's update when automatic tax can't be calculated, such as releasing a delivery selection, keep it here too and leavetax.statusincomplete.
The tax calculation callbacks guide documents the request and response.
Use your callback where Flint creates the order#
Flint creates the orders of quick-pay and subscription plan checkout sessions, payment links, and subscription renewals, so nobody can send their components. Your callback can tax them instead:
- Checkout sessions and payment links take
tax.calculationwith{"mode": "external", "components_source": "callback"}, or{"mode": "automatic"}. External tax needscomponents_source: callback; without it the request returns400 INVALID_REQUESTwith detail codeREQUIRED, andprovidedreturnsINVALID_VALUE. See Tax at checkout. - Subscriptions take
tax:{"enabled": true, "calculation": {"mode": "external", "components_source": "callback"}}. Renewal, setup fee, and plan change orders then ask your callback. A subscription a plan checkout creates copies the tax its session sent. See Tax on subscriptions. - The default applies when they leave the calculation out.
tax.default_calculationin settings covers orders you create withPOST /v1/orders, and the orders of checkout sessions, payment links, and subscriptions that don't set their own calculation. Aprovideddefault applies only to orders you create, since only you can send their components. Flint's orders use automatic tax under it. - Tax on by default needs what its default uses. With a
callbackdefault, turning ontax.default_enabledneeds a selected callback and no tax connection. An automatic, unset, orprovideddefault needs an active tax connection, because Flint's orders calculate automatic tax under it.
Tax on an invoice#
An invoice bills an order, so the order's tax applies. Issuing the invoice recalculates tax and freezes the result, and the frozen amount is what the customer owes. Issuing or collecting fails with ACTION_NOT_ALLOWED with reason configuration_required while the order's tax status is requires_location or incomplete.
The invoice keeps its own record of the tax. pricing_amounts carries tax_money and its split into additive_tax_money and inclusive_tax_money, and snapshot.tax_breakdowns carries the jurisdiction rows. On a draft, snapshot.tax_breakdowns previews the order's current rows. Issuing freezes them with the rest of the snapshot. The API, the hosted invoice, and the PDF read the same frozen rows, and later changes to the order don't reach an issued invoice.
The frozen rows have the same fields as the order's jurisdiction rows. A row for a line item has order_line_item_id, which matches order_line_item_id on that line in snapshot.line_items. A row for a charge has order_charge_id, and a flat order tax has neither. On an external tax invoice, the rows sum to pricing_amounts.tax_money, and the rows with price_mode: inclusive sum to inclusive_tax_money. An exempt sale's rows have tax_money of zero. snapshot.tax_breakdowns is [] when no rows apply. For automatic tax outside the US, snapshot.tax_breakdowns has one row per national or provincial tax for each applicable line item and charge. For US automatic tax, the invoice shows the combined tax amount. Use the tax reports to reconcile it. Some older external tax invoices have no frozen rows.
An exempt invoice also freezes the exemption in snapshot.tax_exemption, with the fields in The exemption snapshot. The buyer copy of the invoice omits evidence_reference. The invoice PDF and receipt show a "Tax exempt" row with the reason and certificate number, and never the evidence reference. A later change to the customer's records or the flag doesn't change an issued invoice's snapshot.
Once an order has an invoice, its amounts can't change; edits fail with RESOURCE_IN_USE. If something that affects tax still changes, such as the order's tax location or fulfillment, collecting fails with ACTION_NOT_ALLOWED and reason invoice_finalized. Void the invoice, then create and issue a new one for the order, which recalculates tax.
An automatic tax invoice can collect in parts. Issuing freezes the tax once, and every payment toward the invoice collects its share of that frozen tax:
- A payment schedule can have a deposit, installments, and a balance. Each entry's
total_moneyincludes its share of the tax. - A manual payment can cover less than the outstanding balance, and you can record several. Each one collects its share of the tax.
- Reversing a manual payment reverses all of that payment and its share of the tax. When an invoice has several manual payments, reverse the one you choose by ID. There's no amount to reverse part of one.
A late fee isn't taxed. The issued line items, tax, and original total stay as they were.
VAT in local currency#
EU and UK invoices must state their VAT in the currency of the country that charges it. When an issued invoice has VAT above zero for an EU member state or the UK, Flint converts that VAT and its taxable amount at the issue date's rate and freezes them in snapshot.tax_currency_conversions:
| Country | Currency | Rate |
|---|---|---|
| Euro-area member states, including Bulgaria and Croatia | EUR | ECB euro reference rate, the latest on or before the issue date |
| Czechia, Denmark, Hungary, Poland, Romania, Sweden | CZK, DKK, HUF, PLN, RON, SEK | ECB euro reference rate, through the euro |
| United Kingdom | GBP | HMRC exchange rate for the month of issue |
The PDF prints the converted taxable amount, the converted VAT, and the rate with its source and date, and credit notes reuse the invoice's rate. Reverse charge records zero VAT, so it needs no conversion. Orders, receipts, and tax reports stay in USD. Australia and New Zealand GST isn't converted. VAT in local currency in the Invoicing guide covers the rounding and what to do when issue can't find a rate.
Inclusive tax on an invoice#
The invoice ladder treats the two kinds of tax differently. Tax added on top of prices is a Tax row, from additive_tax_money, and counts toward the total. Tax included in prices appears as an informational "Includes tax" amount, from inclusive_tax_money, and doesn't add to the total, because subtotal_money and charge_money already contain it. An invoice for one $10.65 item at an inclusive 6.5% shows:
| Row | Amount |
|---|---|
| Subtotal | $10.65 |
| Includes tax | $0.65 |
| Total | $10.65 |
When some prices include tax and others don't, the invoice shows both, and the total adds only the Tax rows. With jurisdiction rows, each jurisdiction gets its own row of the matching kind. If you build your own invoice page, label the amounts the same way. The issue_rows on a buyer invoice already mark included tax with is_informational: true.
Tax attention after payment#
A captured payment stays recorded even if Flint cannot verify the order's stored tax information. On merchant order responses, tax.attention is an object with code: "tax_commitment_failed", a message, and started_at. It is null when no tax issue is outstanding. Buyer responses omit it.
Contact Flint support before changing tax on an order with attention. Refunds remain available. Canceling an already captured payment returns the available refund action. Retrieving the order retries the tax check; attention clears when the information is repaired or no payment, authorization, gift value, or issued invoice still commits its tax. On readable orders, tax attention changes use the order's normal webhook events, including order.updated when no more specific lifecycle event applies. If Flint cannot read the order, it records the payment and tax issue and alerts support, but skips that change's webhook.
Refund tax#
A refund of a line item or charge reverses its tax in proportion to the amount refunded. You don't send anything extra.
- External tax reverses each jurisdiction row separately, so the refunded tax adds up exactly to the cent. Line item reversals are listed in the refund's
line_item_allocations[].tax_breakdown_refunds, and charge reversals in its top-leveltax_breakdown_refunds, each withorder_charge_id. - Automatic tax reverses the tax that the refunded payment collected, so an order paid in parts is refunded payment by payment. The
tax_transactions_itemized_v1andtax_transactions_itemized_v2reports link each reversal to the calculation it reverses.
Refund less tax on a line item#
Some refunds shouldn't return all of a line item's tax, for example when a jurisdiction doesn't refund its share. Set tax_refund_mode: explicit on the line item and send the tax to refund in tax_money. This refunds the pour-over set from the external tax example with only the state's $2.41 of tax:
curl -X POST https://api.withflintpay.com/v1/refunds \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Flint-Version: 2026-09-07" \
-H "Idempotency-Key: sales-tax-refund-001" \
-d '{
"refund_type": "targets",
"order_id": "ord_1kmn0aExample",
"reason": "requested_by_customer",
"line_items": [{
"order_line_item_id": "li_1kmn0aExample",
"quantity": 1,
"tax_refund_mode": "explicit",
"tax_money": {"amount": 241, "currency": "USD"},
"tax_breakdown_refunds": [
{"tax_breakdown_id": "txb_1kmn0aExample", "tax_money": {"amount": 241, "currency": "USD"}}
],
"tax_adjustment_reason": {"code": "jurisdiction_specific_rule"},
"tax_adjustment_audit": {
"actor_id": "usr_1kmn0aExample",
"actor_type": "user",
"source": "support_console"
}
}]
}'
Your API key needs the commerce.refunds.tax_overrides.write scope to send tax_refund_mode: explicit, tax_money, tax_breakdown_refunds, tax_adjustment_reason, or tax_adjustment_audit on a line item. Without it, the refund fails with INSUFFICIENT_SCOPE, naming the field and the missing scope.
tax_refund_modestringautomatic, the default, or explicit. Line items only: charges always reverse their tax in proportion.
tax_moneyMoneyRequiredThe tax to refund. It must be less than the tax an automatic reversal would refund. Zero refunds none of the tax.
tax_breakdown_refundsarrayFor external tax, the rows to refund the tax from, as tax_breakdown_id and tax_money pairs. Required when tax_money is above zero, and the amounts must add up to it. Leave it out for automatic tax, which has no rows, and when tax_money is zero.
tax_adjustment_reasonobjectRequiredWhy you're refunding less tax. code is one of customer_agreement, jurisdiction_specific_rule, merchant_policy, customer_request, restocking_policy, manual_tax_correction, or other, which requires a description.
tax_adjustment_auditobjectRequiredWho made the change: actor_id, actor_type (user, system, or admin), and source, such as the tool they used.
Refund a flat order tax#
A flat order tax is refunded whole, never in part. List the flat tax in the refund's top-level tax_breakdown_refunds with its full remaining tax_money, alongside any line items or charges. With refund_type: "targets", the refund amount is the sum of the named targets, including line item tax, and unnamed tips and flat taxes remain unrefunded. With refund_type: "amount", amount_money sets the refund total and must cover the named targets. If you send tender_allocations, use amount and make them add up to amount_money.
A refund of the order's full remaining amount includes every remaining flat tax when you send that amount as amount_money with refund_type: "amount", or when you send refund_type: "full".
If a flat tax is split across payments, a refund by payment_intent_id returns ACTION_NOT_ALLOWED. Refund by order_id instead.
If part of a refund across several tenders fails, the tax on the failed part becomes refundable again, and a later refund can return it.
Tax reports#
Tax reports are asynchronous CSV exports. See Reports to request and download them.
| Report type | Contains | Use for |
|---|---|---|
tax_itemized_v1 | One row per external tax row on an order | Jurisdiction detail for external tax |
tax_summarized_v1 | Taxable, nontaxable, collected, refunded, and payable tax by jurisdiction and tax type | Filing external tax |
tax_transactions_itemized_v1 | Each automatic tax calculation collected on an order, and each successful refund that reversed one, with each item's tax_category | Automatic tax |
tax_transactions_itemized_v2 | The same rows as tax_transactions_itemized_v1, with one collection row per collection and calculation, plus the collection's source and any exemption recorded on the sale | Automatic tax |
The external tax reports include only external-tax orders and need jurisdiction rows. Use tax_transactions_itemized_v2 for automatic-tax detail and tax_transactions_summarized_v2 for totals by country, state or province and tax type. For a merchant using both modes, generate both exports for the period. US automatic summary rows combine state and local tax because the provider does not supply a local split. Released authorization amounts are excluded from external-tax sales and tax totals.
Every money value in the tax reports is an amount in minor units and a currency, such as tax_money.amount and tax_money.currency. tax_transactions_itemized_v1 and tax_transactions_itemized_v2 have gross_money, discount_money, taxable_money, nontaxable_money, tax_money, total_money, additional_tax_money, and refund_reversed_tax_money, and no separate currency column. Their addresses are seller_origin.* and buyer_destination.* with line1, line2, city, state, postal_code, and country. Their jurisdiction.country, jurisdiction.state, jurisdiction.county, and jurisdiction.city columns hold the jurisdiction the calculation resolved, price_mode is additive or inclusive, and they have no provider columns. A text value that starts with =, +, -, or @ is written with a leading ' so spreadsheets don't run it. tax_transactions_itemized_v2 adds collection_source.*, exemption.*, and post_tax_discount_money. See Reports for every column.
Errors#
Errors use the standard error envelope. For tax location errors, error.param names the field to fix.
Order tax errors#
Automatic tax errors#
Tax location errors#
Order create and update requests that lack a required tax location or full address return 400 INVALID_REQUEST with detail code REQUIRED and the request path in param. Payment, checkout creation and confirmation, invoice issue, and order close read the stored order. If its tax address needs updating, they return 409 ACTION_NOT_ALLOWED with reason configuration_required, identify the order, and omit param. Update the order's tax.location, then retry.
External tax errors#
Invoice errors#
Refund tax errors#
Related docs#
- Orders API reference: every tax field on orders, line items, and charges.
- Tax calculation callbacks: register and select the endpoint of your own tax engine.
- Tips and charges: charge types and taxing a charge.
- Refunds: the rest of the refund request that tax reversal is part of.
- Invoicing: issuing, collecting, and voiding invoices.
- Reports: requesting and downloading tax reports.