> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e-invoice.be/llms.txt
> Use this file to discover all available pages before exploring further.

# Advanced invoicing

> Add allowances (discounts) and charges (fees) to an invoice at document level and at line level.

## Overview

An invoice can contain two types of adjustment:

* **Allowances** (discounts) decrease the invoice amount.
* **Charges** (fees) increase the invoice amount.

You can apply each type at two levels:

1. **Document level**: the adjustment applies to the full invoice (for example an early payment discount or a handling fee).
2. **Line level**: the adjustment applies to one line item (for example a bulk discount on one product).

The API calculates the totals of the document from the lines, the allowances and the charges. [Invoice totals and calculations](/guides/invoice-totals) gives the formulas.

## Send the request

All request bodies on this page go to the same two endpoints: `POST /api/validate/json` (to examine the body) and `POST /api/documents/` (to create the document). Only the JSON body changes. The request below creates the basic invoice; replace its body with a body from this page.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.e-invoice.be/api/documents/" \
    -H "Authorization: Bearer $E_INVOICE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "document_type": "INVOICE",
    "invoice_id": "INV-2026-001",
    "invoice_date": "2026-10-01",
    "due_date": "2026-10-31",
    "currency": "EUR",
    "purchase_order": "PO-12345",
    "vendor_name": "E-INVOICE BV",
    "vendor_tax_id": "BE1018265814",
    "vendor_address": "Brusselsesteenweg 119/A, 1980 Zemst, BE",
    "vendor_email": "billing@e-invoice.be",
    "customer_name": "OpenPeppol VZW",
    "customer_tax_id": "BE0848934496",
    "customer_address": "Robert Schumanplein 6 bus 5, 1040 Brussel, BE",
    "items": [
      {
        "description": "Professional services",
        "quantity": 10,
        "unit": "C62",
        "unit_price": 100.00,
        "amount": 1000.00,
        "tax_rate": "21.00"
      }
    ],
    "subtotal": 1000.00,
    "total_tax": 210.00,
    "invoice_total": 1210.00,
    "amount_due": 1210.00,
    "payment_term": "Payment within 30 days",
    "payment_details": [
      {
        "iban": "BE68539007547034",
        "swift": "GEBABEBB",
        "payment_reference": "INV-2026-001"
      }
    ]
  }'
  ```

  ```javascript Node.js theme={null}
  const invoice = {
    document_type: "INVOICE",
    invoice_id: "INV-2026-001",
    invoice_date: "2026-10-01",
    due_date: "2026-10-31",
    currency: "EUR",
    purchase_order: "PO-12345",
    vendor_name: "E-INVOICE BV",
    vendor_tax_id: "BE1018265814",
    vendor_address: "Brusselsesteenweg 119/A, 1980 Zemst, BE",
    vendor_email: "billing@e-invoice.be",
    customer_name: "OpenPeppol VZW",
    customer_tax_id: "BE0848934496",
    customer_address: "Robert Schumanplein 6 bus 5, 1040 Brussel, BE",
    items: [
      {
        description: "Professional services",
        quantity: 10,
        unit: "C62",
        unit_price: 100.00,
        amount: 1000.00,
        tax_rate: "21.00"
      }
    ],
    subtotal: 1000.00,
    total_tax: 210.00,
    invoice_total: 1210.00,
    amount_due: 1210.00,
    payment_term: "Payment within 30 days",
    payment_details: [
      {
        iban: "BE68539007547034",
        swift: "GEBABEBB",
        payment_reference: "INV-2026-001"
      }
    ]
  };

  const response = await fetch("https://api.e-invoice.be/api/documents/", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.E_INVOICE_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify(invoice),
  });

  const result = await response.json();
  if (!response.ok) {
    throw new Error(`HTTP ${response.status}: ${JSON.stringify(result)}`);
  }
  console.log(result);
  ```

  ```python Python theme={null}
  import os

  import requests

  invoice = {
    "document_type": "INVOICE",
    "invoice_id": "INV-2026-001",
    "invoice_date": "2026-10-01",
    "due_date": "2026-10-31",
    "currency": "EUR",
    "purchase_order": "PO-12345",
    "vendor_name": "E-INVOICE BV",
    "vendor_tax_id": "BE1018265814",
    "vendor_address": "Brusselsesteenweg 119/A, 1980 Zemst, BE",
    "vendor_email": "billing@e-invoice.be",
    "customer_name": "OpenPeppol VZW",
    "customer_tax_id": "BE0848934496",
    "customer_address": "Robert Schumanplein 6 bus 5, 1040 Brussel, BE",
    "items": [
      {
        "description": "Professional services",
        "quantity": 10,
        "unit": "C62",
        "unit_price": 100.00,
        "amount": 1000.00,
        "tax_rate": "21.00"
      }
    ],
    "subtotal": 1000.00,
    "total_tax": 210.00,
    "invoice_total": 1210.00,
    "amount_due": 1210.00,
    "payment_term": "Payment within 30 days",
    "payment_details": [
      {
        "iban": "BE68539007547034",
        "swift": "GEBABEBB",
        "payment_reference": "INV-2026-001"
      }
    ]
  }

  response = requests.post(
      "https://api.e-invoice.be/api/documents/",
      headers={"Authorization": f"Bearer {os.environ['E_INVOICE_API_KEY']}"},
      json=invoice,
      timeout=30,
  )
  if not response.ok:
      raise SystemExit(f"HTTP {response.status_code}: {response.text}")
  print(response.json())
  ```

  ```php PHP theme={null}
  <?php
  $invoice = [
    "document_type" => "INVOICE",
    "invoice_id" => "INV-2026-001",
    "invoice_date" => "2026-10-01",
    "due_date" => "2026-10-31",
    "currency" => "EUR",
    "purchase_order" => "PO-12345",
    "vendor_name" => "E-INVOICE BV",
    "vendor_tax_id" => "BE1018265814",
    "vendor_address" => "Brusselsesteenweg 119/A, 1980 Zemst, BE",
    "vendor_email" => "billing@e-invoice.be",
    "customer_name" => "OpenPeppol VZW",
    "customer_tax_id" => "BE0848934496",
    "customer_address" => "Robert Schumanplein 6 bus 5, 1040 Brussel, BE",
    "items" => [
      [
        "description" => "Professional services",
        "quantity" => 10,
        "unit" => "C62",
        "unit_price" => 100.00,
        "amount" => 1000.00,
        "tax_rate" => "21.00"
      ]
    ],
    "subtotal" => 1000.00,
    "total_tax" => 210.00,
    "invoice_total" => 1210.00,
    "amount_due" => 1210.00,
    "payment_term" => "Payment within 30 days",
    "payment_details" => [
      [
        "iban" => "BE68539007547034",
        "swift" => "GEBABEBB",
        "payment_reference" => "INV-2026-001"
      ]
    ]
  ];

  $ch = curl_init("https://api.e-invoice.be/api/documents/");
  curl_setopt_array($ch, [
      CURLOPT_POST => true,
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => [
          "Authorization: Bearer " . getenv("E_INVOICE_API_KEY"),
          "Content-Type: application/json",
      ],
      CURLOPT_POSTFIELDS => json_encode($invoice),
  ]);

  $body = curl_exec($ch);
  $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  curl_close($ch);

  if ($status >= 400) {
      throw new RuntimeException("HTTP $status: $body");
  }
  print_r(json_decode($body, true));
  ```

  ```csharp C# theme={null}
  using System.Net.Http.Headers;
  using System.Text;

  var invoice = """
  {
    "document_type": "INVOICE",
    "invoice_id": "INV-2026-001",
    "invoice_date": "2026-10-01",
    "due_date": "2026-10-31",
    "currency": "EUR",
    "purchase_order": "PO-12345",
    "vendor_name": "E-INVOICE BV",
    "vendor_tax_id": "BE1018265814",
    "vendor_address": "Brusselsesteenweg 119/A, 1980 Zemst, BE",
    "vendor_email": "billing@e-invoice.be",
    "customer_name": "OpenPeppol VZW",
    "customer_tax_id": "BE0848934496",
    "customer_address": "Robert Schumanplein 6 bus 5, 1040 Brussel, BE",
    "items": [
      {
        "description": "Professional services",
        "quantity": 10,
        "unit": "C62",
        "unit_price": 100.00,
        "amount": 1000.00,
        "tax_rate": "21.00"
      }
    ],
    "subtotal": 1000.00,
    "total_tax": 210.00,
    "invoice_total": 1210.00,
    "amount_due": 1210.00,
    "payment_term": "Payment within 30 days",
    "payment_details": [
      {
        "iban": "BE68539007547034",
        "swift": "GEBABEBB",
        "payment_reference": "INV-2026-001"
      }
    ]
  }
  """;

  using var client = new HttpClient { BaseAddress = new Uri("https://api.e-invoice.be") };
  client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
      "Bearer", Environment.GetEnvironmentVariable("E_INVOICE_API_KEY"));

  var response = await client.PostAsync(
      "/api/documents/",
      new StringContent(invoice, Encoding.UTF8, "application/json"));

  var body = await response.Content.ReadAsStringAsync();
  if (!response.IsSuccessStatusCode)
  {
      throw new HttpRequestException($"HTTP {(int)response.StatusCode}: {body}");
  }
  Console.WriteLine(body);
  ```
</CodeGroup>

Replace the vendor fields with the data of your company. The API rejects a document on create (`406`) if the Peppol ID of the vendor is not one of the Peppol IDs of your company.

The API returns `201` with the document in state `DRAFT`. The response contains the calculated totals as strings:

```json Response (shortened) theme={null}
{
  "id": "doc-1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d",
  "created_at": "2026-10-01T09:30:00Z",
  "document_type": "INVOICE",
  "state": "DRAFT",
  "direction": "OUTBOUND",
  "invoice_id": "INV-2026-001",
  "currency": "EUR",
  "subtotal": "1000.00",
  "total_discount": "0.00",
  "total_tax": "210.00",
  "invoice_total": "1210.00",
  "amount_due": "1210.00"
}
```

<Note>
  Validation is not a separate mandatory call. `POST /api/documents/` rejects a payload that does not pass the same rules. Use `POST /api/validate/json` while you develop, because it returns all rule failures and the generated UBL.
</Note>

Many examples on this page are fragments: they show only the `items`, `allowances` or `charges` part of the body. Add them to a complete document before you send them.

## Document-level allowances

A document-level allowance decreases the invoice amount after the line items are added together.

### Early payment discount

```json theme={null}
{
  "document_type": "INVOICE",
  "invoice_id": "INV-2026-010",
  "invoice_date": "2026-10-01",
  "due_date": "2026-10-31",
  "currency": "EUR",
  "vendor_name": "E-INVOICE BV",
  "vendor_tax_id": "BE1018265814",
  "vendor_address": "Brusselsesteenweg 119/A, 1980 Zemst, BE",
  "customer_name": "OpenPeppol VZW",
  "customer_tax_id": "BE0848934496",
  "customer_address": "Robert Schumanplein 6 bus 5, 1040 Brussel, BE",
  "items": [
    {
      "description": "Product A",
      "quantity": 10,
      "unit": "C62",
      "unit_price": 100.00,
      "amount": 1000.00,
      "tax_rate": "21.00"
    }
  ],
  "allowances": [
    {
      "amount": 50.00,
      "reason": "Early payment discount (5%)",
      "tax_code": "S",
      "tax_rate": "21.00"
    }
  ]
}
```

Calculation:

* Line items: €1,000.00
* Allowance: -€50.00
* `subtotal`: €950.00
* `total_tax` (21%): €199.50
* `invoice_total`: €1,149.50

### More than one document-level allowance

```json theme={null}
{
  "allowances": [
    {
      "amount": 50.00,
      "reason": "Volume discount",
      "tax_code": "S",
      "tax_rate": "21.00"
    },
    {
      "amount": 25.00,
      "reason": "Promotional discount",
      "tax_code": "S",
      "tax_rate": "21.00"
    }
  ]
}
```

Calculation with line items of €1,000.00:

* Volume discount: -€50.00
* Promotional discount: -€25.00
* `subtotal`: €925.00
* `total_tax` (21%): €194.25
* `invoice_total`: €1,119.25

To state an allowance as a percentage, refer to [Percentage allowances and charges](#percentage-allowances-and-charges).

## Document-level charges

A document-level charge increases the invoice amount.

### Shipping fee

```json theme={null}
{
  "document_type": "INVOICE",
  "invoice_id": "INV-2026-011",
  "invoice_date": "2026-10-01",
  "due_date": "2026-10-31",
  "currency": "EUR",
  "vendor_name": "E-INVOICE BV",
  "vendor_tax_id": "BE1018265814",
  "vendor_address": "Brusselsesteenweg 119/A, 1980 Zemst, BE",
  "customer_name": "OpenPeppol VZW",
  "customer_tax_id": "BE0848934496",
  "customer_address": "Robert Schumanplein 6 bus 5, 1040 Brussel, BE",
  "items": [
    {
      "description": "Product B",
      "quantity": 5,
      "unit": "C62",
      "unit_price": 200.00,
      "amount": 1000.00,
      "tax_rate": "21.00"
    }
  ],
  "charges": [
    {
      "amount": 25.00,
      "reason": "Shipping and handling",
      "tax_code": "S",
      "tax_rate": "21.00"
    }
  ]
}
```

Calculation:

* Line items: €1,000.00
* Charge: +€25.00
* `subtotal`: €1,025.00
* `total_tax` (21%): €215.25
* `invoice_total`: €1,240.25

### More than one charge

```json theme={null}
{
  "charges": [
    {
      "amount": 25.00,
      "reason": "Shipping",
      "tax_code": "S",
      "tax_rate": "21.00"
    },
    {
      "amount": 15.00,
      "reason": "Insurance",
      "tax_code": "S",
      "tax_rate": "21.00"
    }
  ]
}
```

## Combine allowances and charges

One invoice can contain allowances and charges:

```json theme={null}
{
  "document_type": "INVOICE",
  "invoice_id": "INV-2026-012",
  "invoice_date": "2026-10-01",
  "due_date": "2026-10-31",
  "currency": "EUR",
  "vendor_name": "E-INVOICE BV",
  "vendor_tax_id": "BE1018265814",
  "vendor_address": "Brusselsesteenweg 119/A, 1980 Zemst, BE",
  "customer_name": "OpenPeppol VZW",
  "customer_tax_id": "BE0848934496",
  "customer_address": "Robert Schumanplein 6 bus 5, 1040 Brussel, BE",
  "items": [
    {
      "description": "Product C",
      "quantity": 10,
      "unit": "C62",
      "unit_price": 100.00,
      "amount": 1000.00,
      "tax_rate": "21.00"
    }
  ],
  "allowances": [
    {
      "amount": 100.00,
      "reason": "Bulk purchase discount (10%)",
      "tax_code": "S",
      "tax_rate": "21.00"
    }
  ],
  "charges": [
    {
      "amount": 30.00,
      "reason": "Express delivery",
      "tax_code": "S",
      "tax_rate": "21.00"
    }
  ]
}
```

Calculation:

* Line items: €1,000.00
* Allowance: -€100.00
* Charge: +€30.00
* `subtotal`: €930.00
* `total_tax` (21%): €195.30
* `invoice_total`: €1,125.30

## Line-level allowances

A line-level allowance applies to one line item.

<Note>
  The `amount` of a line is the net amount of the line: `quantity × unit_price`, minus the allowances of the line, plus the charges of the line. The API writes `amount` to the UBL as the line amount, and calculates the document totals from `quantity`, `unit_price` and the line allowances and charges. Make sure that the two results are equal.
</Note>

### Discount on one product

```json theme={null}
{
  "items": [
    {
      "description": "Product D",
      "quantity": 10,
      "unit": "C62",
      "unit_price": 100.00,
      "amount": 900.00,
      "tax_rate": "21.00",
      "allowances": [
        {
          "amount": 100.00,
          "reason": "10% discount on this product"
        }
      ]
    },
    {
      "description": "Product E",
      "quantity": 5,
      "unit": "C62",
      "unit_price": 50.00,
      "amount": 250.00,
      "tax_rate": "21.00"
    }
  ]
}
```

Calculation:

* Line 1: (10 × €100) - €100 = €900.00
* Line 2: 5 × €50 = €250.00
* `subtotal`: €1,150.00
* `total_tax` (21%): €241.50
* `invoice_total`: €1,391.50

A line-level allowance or charge uses the tax rate of its line. It has no tax category of its own in the UBL.

### More than one allowance on one line

```json theme={null}
{
  "items": [
    {
      "description": "Product F",
      "quantity": 20,
      "unit": "C62",
      "unit_price": 100.00,
      "amount": 1850.00,
      "tax_rate": "21.00",
      "allowances": [
        {
          "amount": 100.00,
          "reason": "Volume discount (5%)"
        },
        {
          "amount": 50.00,
          "reason": "Loyalty programme discount"
        }
      ]
    }
  ]
}
```

Calculation of line 1:

* Base: 20 × €100 = €2,000.00
* Volume discount: -€100.00
* Loyalty discount: -€50.00
* Line amount: €1,850.00

## Line-level charges

A line-level charge applies to one line item.

```json theme={null}
{
  "items": [
    {
      "description": "Fragile equipment",
      "quantity": 1,
      "unit": "C62",
      "unit_price": 500.00,
      "amount": 550.00,
      "tax_rate": "21.00",
      "charges": [
        {
          "amount": 50.00,
          "reason": "Special handling - fragile item"
        }
      ]
    }
  ]
}
```

Calculation of line 1:

* Base: 1 × €500 = €500.00
* Special handling: +€50.00
* Line amount: €550.00

## Complete example with the two levels

This invoice uses allowances and charges at document level and at line level:

```json theme={null}
{
  "document_type": "INVOICE",
  "invoice_id": "INV-2026-013",
  "invoice_date": "2026-10-01",
  "due_date": "2026-10-31",
  "currency": "EUR",
  "payment_term": "Net 30 days",
  "vendor_name": "E-INVOICE BV",
  "vendor_tax_id": "BE1018265814",
  "vendor_address": "Brusselsesteenweg 119/A, 1980 Zemst, BE",
  "customer_name": "OpenPeppol VZW",
  "customer_tax_id": "BE0848934496",
  "customer_address": "Robert Schumanplein 6 bus 5, 1040 Brussel, BE",
  "items": [
    {
      "description": "Premium product A",
      "quantity": 20,
      "unit": "C62",
      "unit_price": 100.00,
      "amount": 1800.00,
      "tax_rate": "21.00",
      "allowances": [
        {
          "amount": 200.00,
          "reason": "Bulk discount (10%)"
        }
      ]
    },
    {
      "description": "Standard product B",
      "quantity": 10,
      "unit": "C62",
      "unit_price": 50.00,
      "amount": 500.00,
      "tax_rate": "21.00"
    },
    {
      "description": "Heavy equipment",
      "quantity": 1,
      "unit": "C62",
      "unit_price": 1000.00,
      "amount": 1100.00,
      "tax_rate": "21.00",
      "charges": [
        {
          "amount": 100.00,
          "reason": "Oversized item handling"
        }
      ]
    }
  ],
  "allowances": [
    {
      "amount": 150.00,
      "reason": "Early payment discount",
      "tax_code": "S",
      "tax_rate": "21.00"
    }
  ],
  "charges": [
    {
      "amount": 50.00,
      "reason": "Delivery service",
      "tax_code": "S",
      "tax_rate": "21.00"
    }
  ]
}
```

Line items:

* Line 1: (20 × €100) - €200 = €1,800.00
* Line 2: 10 × €50 = €500.00
* Line 3: €1,000 + €100 = €1,100.00
* Sum of the lines: €3,400.00

Document level:

* Allowance: -€150.00
* Charge: +€50.00
* `subtotal`: €3,300.00
* `total_discount`: €150.00

Tax and total:

* `total_tax` (21% of €3,300.00): €693.00
* `invoice_total`: €3,993.00

## Tax on allowances and charges

Each document-level allowance and charge has a `tax_rate` (default `21.00`) and a `tax_code` (default `S`). The API adds the amount to the tax base of the lines that have the same `tax_rate`.

### Same tax rate

If all lines have one tax rate, use that rate for the allowance or charge:

```json theme={null}
{
  "items": [
    {
      "description": "Product A",
      "quantity": 10,
      "unit": "C62",
      "unit_price": 100.00,
      "amount": 1000.00,
      "tax_rate": "21.00"
    }
  ],
  "allowances": [
    {
      "amount": 50.00,
      "reason": "Volume discount",
      "tax_rate": "21.00",
      "tax_code": "S"
    }
  ]
}
```

### Different tax rates

If the invoice has more than one tax rate, give each allowance or charge the rate of the lines to which it applies:

```json theme={null}
{
  "items": [
    {
      "description": "Standard rate item",
      "quantity": 1,
      "unit": "C62",
      "unit_price": 100.00,
      "amount": 100.00,
      "tax_rate": "21.00"
    },
    {
      "description": "Reduced rate item",
      "quantity": 1,
      "unit": "C62",
      "unit_price": 50.00,
      "amount": 50.00,
      "tax_rate": "6.00"
    }
  ],
  "allowances": [
    {
      "amount": 50.00,
      "reason": "General discount on standard rate items",
      "tax_rate": "21.00",
      "tax_code": "S"
    }
  ]
}
```

### Allowances and charges without VAT

For an allowance or charge on items that are exempt from VAT, send `tax_rate` `0.00` and the applicable tax category code:

```json theme={null}
{
  "allowances": [
    {
      "amount": 100.00,
      "reason": "Discount on exempt items",
      "tax_rate": "0.00",
      "tax_code": "E"
    }
  ]
}
```

An allowance or charge with `tax_rate` `0.00` changes `subtotal` but does not change `total_tax`.

## Validation of the result

The API converts the JSON body to a Peppol BIS Billing 3.0 document. The rules of that standard depend on the content of the invoice: the country of the vendor, the document type, the tax category codes and the tax rates. For example, each document-level allowance must have a reason or a reason code, and its tax category must agree with its rate.

<Note>
  Validation is not a separate mandatory call. `POST /api/documents/` rejects a payload that does not pass the same rules. Use `POST /api/validate/json` while you develop, because it returns all rule failures and the generated UBL.
</Note>

Refer to the [validation guide](/guides/validation) for the response format and to [Errors and troubleshooting](/guides/errors) for the rules that fail most frequently.

## Recommended practices

<AccordionGroup>
  <Accordion title="Give a clear reason">
    Give each allowance and charge a reason that the customer can understand.

    Clear:

    ```json theme={null}
    {
      "reason": "Early payment discount (2% if paid within 10 days)"
    }
    ```

    Not clear:

    ```json theme={null}
    {
      "reason": "Discount"
    }
    ```
  </Accordion>

  <Accordion title="Select the correct level">
    Use the document level when the allowance or charge applies to the full order:

    * Early payment discounts
    * Shipping for the full order
    * Promotional discounts on the full order

    Use the line level when it applies to one product:

    * Bulk discount on one product
    * Special handling for a fragile item
    * Promotion on one product
  </Accordion>

  <Accordion title="Round the amounts">
    When you calculate an amount from a percentage, round the result to 2 decimals before you send it:

    ```javascript theme={null}
    const lineItemsTotal = 1000.0;
    const discountPercent = 5;
    const discountAmount =
      Math.round(lineItemsTotal * (discountPercent / 100) * 100) / 100; // 50.00
    ```
  </Accordion>

  <Accordion title="Use the tax category of the items">
    Give each document-level allowance and charge the tax category code and the tax rate of the items to which it applies.
  </Accordion>

  <Accordion title="State the payment terms">
    When you give an early payment discount, state the terms in `payment_term`:

    ```json theme={null}
    {
      "payment_term": "Net 30 days. 2% discount if paid within 10 days.",
      "allowances": [
        {
          "amount": 50.00,
          "reason": "Early payment discount (2%)",
          "tax_code": "S",
          "tax_rate": "21.00"
        }
      ]
    }
    ```
  </Accordion>
</AccordionGroup>

## Frequent cases

<Steps>
  <Step title="Volume discounts">
    ```json theme={null}
    {
      "items": [
        {
          "description": "Product X",
          "quantity": 100,
          "unit": "C62",
          "unit_price": 10.00,
          "amount": 900.00,
          "tax_rate": "21.00",
          "allowances": [
            {
              "amount": 100.00,
              "reason": "Volume discount - 100+ units (10%)"
            }
          ]
        }
      ]
    }
    ```
  </Step>

  <Step title="Shipping and handling">
    ```json theme={null}
    {
      "charges": [
        {
          "amount": 15.00,
          "reason": "Standard shipping",
          "tax_code": "S",
          "tax_rate": "21.00"
        },
        {
          "amount": 5.00,
          "reason": "Handling fee",
          "tax_code": "S",
          "tax_rate": "21.00"
        }
      ]
    }
    ```
  </Step>

  <Step title="Loyalty programme discounts">
    ```json theme={null}
    {
      "allowances": [
        {
          "amount": 25.00,
          "reason": "Gold member discount (5%)",
          "tax_code": "S",
          "tax_rate": "21.00"
        }
      ]
    }
    ```
  </Step>

  <Step title="Financial charges">
    ```json theme={null}
    {
      "charges": [
        {
          "amount": 2.50,
          "reason": "Credit card processing fee (2.5%)",
          "tax_code": "S",
          "tax_rate": "21.00"
        }
      ]
    }
    ```
  </Step>
</Steps>

## Percentage allowances and charges

To state an allowance or a charge as a percentage, send `multiplier_factor` and `base_amount` together with `amount`. `multiplier_factor` is the percentage (send `10` for 10%; minimum 0, maximum 100, 2 decimals maximum).

<Warning>
  The API does not calculate `amount` from `multiplier_factor` and `base_amount`, and it does not compare the three values. You must send `amount` (`base_amount × multiplier_factor / 100`, rounded to 2 decimals).
</Warning>

```json theme={null}
{
  "document_type": "INVOICE",
  "invoice_id": "INV-2026-014",
  "invoice_date": "2026-10-01",
  "due_date": "2026-10-31",
  "currency": "EUR",
  "vendor_name": "E-INVOICE BV",
  "vendor_tax_id": "BE1018265814",
  "vendor_address": "Brusselsesteenweg 119/A, 1980 Zemst, BE",
  "customer_name": "OpenPeppol VZW",
  "customer_tax_id": "BE0848934496",
  "customer_address": "Robert Schumanplein 6 bus 5, 1040 Brussel, BE",
  "items": [
    {
      "description": "Professional services",
      "quantity": 10,
      "unit": "C62",
      "unit_price": 100.00,
      "amount": 1000.00,
      "tax_rate": "21.00"
    }
  ],
  "allowances": [
    {
      "reason": "Volume discount",
      "reason_code": "95",
      "multiplier_factor": 10,
      "base_amount": 1000.00,
      "amount": 100.00,
      "tax_code": "S",
      "tax_rate": "21.00"
    }
  ]
}
```

Totals that the API calculates: `subtotal` 900.00, `total_discount` 100.00, `total_tax` 189.00, `invoice_total` 1089.00.

A charge accepts the same three fields (`multiplier_factor`, `base_amount`, `amount`).

### Allowance reason codes

The `reason_code` of an allowance accepts these UNCL5189 codes (send the code as a string):

| Code | Meaning |
| - | - |
| `41` | Bonus for works ahead of schedule |
| `42` | Other bonus |
| `60` | Manufacturer's consumer discount |
| `62` | Due to military status |
| `63` | Due to work accident |
| `64` | Special agreement |
| `65` | Production error discount |
| `66` | New outlet discount |
| `67` | Sample discount |
| `68` | End-of-range discount |
| `70` | Incoterm discount |
| `71` | Point of sales threshold allowance |
| `88` | Material surcharge/deduction |
| `95` | Discount |
| `100` | Special rebate |
| `102` | Fixed long term |
| `103` | Temporary |
| `104` | Standard |
| `105` | Yearly turnover |

The `reason_code` of a charge accepts the UNCL7161 codes. The full list is in the `ChargeReasonCode` schema of the [API reference](/api-reference).

## Next Steps

<CardGroup cols={2}>
  <Card title="Invoice totals and calculations" icon="calculator" href="/guides/invoice-totals">
    Read how the API calculates and examines the totals
  </Card>

  <Card title="Create credit notes" icon="rotate-left" href="/guides/credit-notes">
    Create credit notes with allowances
  </Card>

  <Card title="Validation during development" icon="circle-check" href="/guides/validation">
    Examine complex invoices while you develop
  </Card>

  <Card title="LineItem" icon="list-ol" href="/api-reference/schemas/line-item">
    See all fields of a line item, an allowance and a charge
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.