How to apply a discount at the item level and globally?
A discount can be applied at the item level or globally. Below is an example for each case:
Item discount
Line-item discounts are applied directly to each item. When a discount is present the full_amount is calculated as follows:
full_amount = ((unit_amount - discount) * quantity) + VAT
The discount is applied per unit, excluding VAT.
{ "content": { "type": "SIMPLIFIED", "number": "E-3", "text": "Factura de venta de prendas de vestir", "full_amount": "50.45", "items": [ { "text": "Sombrero", "quantity": "3", "unit_amount": "16.52", "full_amount": "45.45", "discount":"4.00", "system": { "type": "REGULAR", "category": { "type": "VAT" } } }, { "text": "Bufanda", "quantity": "1", "unit_amount": "4.13", "full_amount": "5", "system": { "type": "REGULAR", "category": { "type": "VAT" } } } ] }, "metadata": { "metadata1": "metadata1", "metadata2": "metadata2" }}Global discount
Global discounts must be included as an additional line in the invoice, with a negative amount.
{ "content": { "type": "SIMPLIFIED", "number": "E-1", "text": "Factura de venta de prendas de vestir", "full_amount": "980.10", "items": [ { "text": "Zapatos", "quantity": "1", "unit_amount": "300.00", "discount": "90.00", "full_amount": "254.10", "system": { "type": "REGULAR", "category": { "type": "VAT" } } }, { "text": "Chaqueta", "quantity": "1", "unit_amount": "800.0", "full_amount": "968.0", "system": { "type": "REGULAR", "category": { "type": "VAT" } } }, { "text": "Discount", "quantity": "1", "unit_amount": "-200.0", "full_amount": "-242.0", "system": { "type": "REGULAR", "category": { "type": "VAT" } } } ] }, "metadata": { "metadata1": "metadata1", "metadata2": "metadata2" }}How should a global discount be represented when multiple VAT rates apply?
A separate global discount line must be created for each VAT rate. If no VAT rate is provided, a default rate of 21% is applied.
{ "text": "Discount", "quantity": "1", "unit_amount": "-200.0", "full_amount": "-242.0", "system": { "type": "REGULAR", "category": { "type": "VAT" } }},{ "text": "Discount", "quantity": "1", "unit_amount": "-100.0", "full_amount": "-100.0", "system": { "type": "REGULAR", "category": { "type": "NO_VAT", "cause": "TAXABLE_EXEMPT_1" } }}Was this page helpful?