Transaction with Discount

Discounts are reported as additional line items, where you can either apply the discount to a specific item, or to the whole invoice (see reference_number parameter below). If the discount applies to the entire invoice, you can omit the reference_number parameter.

Discounts need to have a parameter “type” put to “Discount” in the line item details.

In the below example, we reported a transaction with 2 line items related to the sale, and a discount was applied to the 2nd line item.

Discount items should have negative signs next to unit_price, net_price, and tax_amount.

Example request:

{
    "language_code": "HU",
    "country_code": "HU",
    "type": "SIMPLIFIED",
    "currency_code": "HUF",
    "direction": "SENT",
    "transaction_id": "Reference105",
    "supplier": {
        "id": "8db9a4a4aaec4c969a402692eb33035c"
    },
    "transaction_date": "2023-01-05T01:00:00+00:00",
    "payments": [
        {
            "type": "DEBIT",
            "amount": 1270
        }
    ],
    "items": [
        {
            "number": 1,
            "name": "Delivery Service",
            "unit": "Delivery",
            "quantity": 1.0,
            "unit_price": 1000,
            "net_price": 1000,
            "tax_breakdown": [
                {
                    "rate": 27,
                    "amount": 270,
                    "regime": "VAT"
                }
            ]
         },
        {
            "number": 2,
            "name": "Delivery fee",
            "unit": "pcs",
            "quantity": 1.0,
            "unit_price": 100,
            "net_price": 100,
            "tax_breakdown": [
                {
                    "rate": 27,
                    "amount": 27,
                    "regime": "VAT"
                }
            ]
        },
        {
            "number":3,
            "reference_number":2,
            "type":"DISCOUNT",
            "name": "Discount",
            "unit": "pcs",
            "quantity": 1.0,
            "unit_price": -100,
            "net_price": -100,
            "tax_breakdown": [
                {
                    "rate": 27,
                    "amount": -27,
                    "regime": "VAT"
                }
            ]
        }
    ],
    "total_amount": 1270,
    "total_net_amount": 1000,
    "total_tax_amount": 270
}