Skip to content
Adyen

Adyen ESD line total mismatch: totalAmount, quantity and unitPrice

For Visa, Adyen requires each itemDetailLines.totalAmount to equal quantity times unitPrice minus discountAmount, and the payment amount to equal the line totals plus freightAmount and totalTaxAmount. A line that does not add up makes Adyen drop the Level 3 data, while the payment still goes through.

Last reviewed Nov 24, 2026
On this page

Adyen does the arithmetic on every line for Visa. A rounding or discount mistake on one line is enough.

The rule

  • Adyen, Level 2/3 data: itemDetailLines.totalAmount = (quantity x unitPrice) - discountAmount.
  • And for the whole payment: amount.value equals the sum of each line's totalAmount plus freightAmount plus totalTaxAmount.
  • When data does not meet requirements, Adyen drops it and processes the payment. On Visa, where only Level 3 counts since April 1, 2026, the sale settles without data.

Why it happens

A line discount is applied to the total but not sent in discountAmount, or the line total comes from a different system than the unit price.

Wrong and right

Wrong: a $13.00 discount hidden in the line total

{
  "amount": { "currency": "USD", "value": 24102 },
  "enhancedSchemeData": {
    "levelTwoThree": {
      "totalTaxAmount": 1662,
      "itemDetailLines": [
        { "description": "Nitrile gloves, large", "quantity": 10, "unitPrice": 1299, "totalAmount": 11690 },
        { "description": "Shop towels, 200 ct", "quantity": 5, "unitPrice": 2150, "totalAmount": 10750 }
      ]
    }
  }
}

10 times 1,299 is 12,990, not 11,690. The payment total is right; the line does not explain it.

Right: the discount in its own field

{
  "amount": { "currency": "USD", "value": 24102 },
  "enhancedSchemeData": {
    "levelTwoThree": {
      "totalTaxAmount": 1662,
      "itemDetailLines": [
        { "description": "Nitrile gloves, large", "quantity": 10, "unitPrice": 1299, "discountAmount": 1300, "totalAmount": 11690 },
        { "description": "Shop towels, 200 ct", "quantity": 5, "unitPrice": 2150, "totalAmount": 10750 }
      ]
    }
  }
}

What to do

  1. Compute totalAmount from the fields you send, not copy it from another system.
  2. Send line discounts in discountAmount.
  3. With a partial capture, send the data again on the capture, with lines that add up to the captured amount.

Sources

  • Adyen, Level 2/3 data, calculation guidelines for Visa and what Adyen does with invalid data (read November 24, 2026).
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