Skip to content
Stripe

Stripe amount_details_amount_mismatch: line items that do not add up

Stripe checks that line items, tax, shipping and discount account for the PaymentIntent amount. When they do not, it returns a 400 error by default; with enforce_arithmetic_validation set to false, the payment goes through with amount_details_amount_mismatch and the line items do not reach the card networks.

Last reviewed Nov 24, 2026
On this page

The amount charged is right, but the line items describe a different total. Stripe catches it, and how loudly depends on one flag.

The rule

  • Default: when the sum of line items does not match the total, Stripe returns a 400 error so you can correct it (Stripe, Payment line items). The total has to account for discounts, tax and shipping.
  • With the check off: with amount_details.enforce_arithmetic_validation set to false, available since 2026-01-28.clover, the request proceeds and Stripe reports the problem in amount_details.error, with codes such as amount_details_amount_mismatch (Stripe changelog, opt out of strict arithmetic validation). Stripe does not send line item data with arithmetic errors to the card networks, so the sale loses its Level 3 data.

Why it happens

The usual gaps are a fee added to amount but not to the details, a rounding difference when tax is computed per line and summed at order level, and a partial capture where the captured amount no longer matches the authorized line items.

Wrong and right

Wrong: $15.00 in the amount that the details do not explain

{
  "amount": 11558,
  "currency": "usd",
  "amount_details": {
    "tax": { "total_tax_amount": 658 },
    "line_items": [
      { "product_name": "Hex bolts 3/8 in, zinc", "product_code": "HB-38-ZN", "quantity": 200, "unit_cost": 35 },
      { "product_name": "Flat washers 3/8 in", "product_code": "FW-38-ZN", "quantity": 200, "unit_cost": 12 }
    ]
  }
}

Lines 9,400 plus tax 658 is 10,058, not 11,558.

Right: the amount the details add up to

{
  "amount": 10058,
  "currency": "usd",
  "amount_details": {
    "tax": { "total_tax_amount": 658 },
    "line_items": [
      { "product_name": "Hex bolts 3/8 in, zinc", "product_code": "HB-38-ZN", "quantity": 200, "unit_cost": 35 },
      { "product_name": "Flat washers 3/8 in", "product_code": "FW-38-ZN", "quantity": 200, "unit_cost": 12 }
    ]
  }
}

If the extra $15.00 is shipping, send it in amount_details.shipping.amount; if it is a surcharge, Stripe documents amount_details.surcharge for it (Stripe, Payment line items for flexible payments).

What to do

  1. Build amount from the same numbers you send in amount_details, not from a separate total.
  2. On partial captures, send updated amount_details with the capture.
  3. If you turn validation off, read amount_details.error on every payment: a non empty error means no Level 3 data reached the network.

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