Zum Inhalt springen

How to calculate the full_amount of an item?

The full_amount field for each line (item) must be calculated as follows:

full_amount = (unit_amount * quantity) + VAT

Example:

full_amount  = (16.52 * 3) + 10% VAT = 54.52

{
"text": "Sombrero",
"quantity": "3",
"unit_amount": "16.52",
"full_amount": "54.52",
"system": {
"type": "REGULAR",
"category": {
"type": "VAT",
"rate": "10.0"
}
}
}

 

How are line-item discounts reflected in the full_amount calculation?

If discounts are applied at the item level, the calculation is performed as follows:

full_amount = ((unit_amount - discount) * quantity) + VAT

The discount is applied per unit, excluding VAT.

Example:

full_amount  = ((16.52 - 4.00) * 3) + 21% VAT = 45.45

For more details, see the article: How to apply a discount at the item level and globally 

{
"text": "Sombrero",
"quantity": "3",
"unit_amount": "16.52",
"full_amount": "45.45",
"discount":"4.00",
"system": {
"type": "REGULAR",
"category": {
"type": "VAT"
}
}
}

Was this page helpful?