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_validationset to false, available since 2026-01-28.clover, the request proceeds and Stripe reports the problem inamount_details.error, with codes such asamount_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
- Build
amountfrom the same numbers you send inamount_details, not from a separate total. - On partial captures, send updated
amount_detailswith the capture. - If you turn validation off, read
amount_details.erroron every payment: a non empty error means no Level 3 data reached the network.
Sources
- Stripe, Payment line items, arithmetic validation (read November 24, 2026).
- Stripe changelog, opt out of strict arithmetic validation.
- Stripe, Payment line items for flexible payments, surcharges and partial captures.
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.