Skip to content
Stripe

Stripe tax at order and line level: why the request fails

On Stripe, amount_details.tax.total_tax_amount and line_items[].tax.total_tax_amount are mutually exclusive: you can send one or the other. Send tax per line when your tax service computes it per line, or one order total when it computes it per order, never both.

Last reviewed Nov 24, 2026
On this page

Adding tax everywhere feels safe. On a Stripe PaymentIntent it is not: tax goes at one level.

The rule

  • Stripe, Payment line items and Stripe API, Create a PaymentIntent: amount_details[tax][total_tax_amount] and amount_details[line_items][][tax][total_tax_amount] are mutually exclusive. You can only specify one or the other.
  • With tax per line, the total is the sum of each line's cost plus its tax. With tax per order, it is the sum of the lines plus the order tax.

Why it happens

An integration adds line level tax for Level 3 and keeps the order level tax it already sent for Level 2.

Wrong and right

Wrong: tax at both levels

{
  "amount": 10058,
  "currency": "usd",
  "amount_details": {
    "tax": { "total_tax_amount": 658 },
    "line_items": [
      { "product_name": "Hex bolts 3/8 in, zinc", "quantity": 200, "unit_cost": 35, "tax": { "total_tax_amount": 490 } },
      { "product_name": "Flat washers 3/8 in", "quantity": 200, "unit_cost": 12, "tax": { "total_tax_amount": 168 } }
    ]
  }
}

Right: tax per line only

{
  "amount": 10058,
  "currency": "usd",
  "amount_details": {
    "line_items": [
      { "product_name": "Hex bolts 3/8 in, zinc", "quantity": 200, "unit_cost": 35, "tax": { "total_tax_amount": 490 } },
      { "product_name": "Flat washers 3/8 in", "quantity": 200, "unit_cost": 12, "tax": { "total_tax_amount": 168 } }
    ]
  }
}

Or drop the line tax and keep "tax": { "total_tax_amount": 658 } at order level.

What to do

  1. Pick the level your tax service computes at.
  2. Do the same for discounts: discount_amount is also order level or line level, not both.

Sources

Check one transaction

Run this sale through the checker.

The sale from this page is already filled in. Press Check transaction, then change it to one of your own. No account needed.

Allow analytics cookies? Privacy