Overview
Beyond basic invoicing, you may need to apply:- Allowances (discounts) - Reduce the invoice amount
- Charges (fees) - Increase the invoice amount
- Document level - Apply to the entire invoice (e.g., early payment discount, handling fees)
- Line item level - Apply to specific products/services (e.g., bulk discount on one product)
Document-Level Allowances
Document-level allowances reduce the total invoice amount after calculating line items.Early Payment Discount Example
- Line items subtotal: €1,000.00
- Allowance (discount): -€50.00
- Net amount: €950.00
- VAT (21%): €199.50
- Total: €1,149.50
Multiple Document-Level Allowances
You can apply multiple allowances:- Line items subtotal: €1,000.00
- Volume discount: -€50.00
- Promotional discount: -€25.00
- Net amount: €925.00
- VAT (21%): €194.25
- Total: €1,119.25
Percentage-Based Allowances
While the API accepts fixed amounts, you can calculate percentages in your code:Document-Level Charges
Document-level charges increase the total invoice amount.Shipping Fee Example
- Line items subtotal: €1,000.00
- Shipping charge: +€25.00
- Net amount: €1,025.00
- VAT (21%): €215.25
- Total: €1,240.25
Financial Charges
Multiple Charges
Combining Allowances and Charges
You can use both allowances and charges on the same invoice:- Line items subtotal: €1,000.00
- Bulk discount: -€100.00
- Express delivery: +€30.00
- Net amount: €930.00
- VAT (21%): €195.30
- Total: €1,125.30
Line Item Level Allowances
Line item allowances apply to specific products/services.Product-Specific Discount
- Line 1: (10 × €100) - €100 = €900.00
- Line 2: 5 × €50 = €250.00
- Subtotal: €1,150.00
- VAT (21%): €241.50
- Total: €1,391.50
Multiple Allowances on One Line Item
- Base: 20 × €100 = €2,000.00
- Volume discount: -€100.00
- Loyalty discount: -€50.00
- Line total: €1,850.00
Line Item Level Charges
Apply charges to specific line items:Special Handling Fee
- Base: 1 × €500 = €500.00
- Special handling: +€50.00
- Line total: €550.00
Complex Invoice Example
Here’s a complete invoice using allowances and charges at both levels:- Line 1: (20 × €100) - €200 (bulk) = €1,800.00
- Line 2: 10 × €50 = €500.00
- Line 3: €1,000 + €100 (handling) = €1,100.00
- Line items subtotal: €3,400.00
- Early payment allowance: -€150.00
- Delivery charge: +€50.00
- Net amount: €3,300.00
- VAT (21% on €3,300): €693.00
Complete Code Example
Tax Considerations
Same Tax Rate
Allowances and charges typically use the same tax rate as the line items:Different Tax Rates
If your invoice has multiple tax rates, specify the appropriate rate for each allowance/charge:Tax-Exempt Allowances/Charges
For tax-exempt items:Context-Specific UBL Requirements
UBL (Universal Business Language) compliance depends on the context of your invoice. Depending on who the vendor is and the jurisdiction, UBL requires different fields to be present for the document to be valid. This is why validation is critical before document creation.Why Validation Matters
Consider two similar invoice structures: Example 1: Valid UBL DocumentContext-Dependent Fields
What makes an invoice “valid” depends on:- Vendor jurisdiction - Different countries have different requirements
- Vendor business type - Public sector, private company, non-profit, etc.
- Invoice type - Regular invoice, credit note, etc.
- Customer type - B2B, B2G, B2C, etc.
- Tax obligations - VAT, reverse charge, exemptions, etc.
Best Practice: Validate First
- ✓ JSON structure matches API schema
- ✓ All required fields for your vendor context are present
- ✓ The JSON can be converted to valid UBL BIS Billing 3.0
- ✓ Tax codes and rates are compatible
- ✓ Amounts and calculations are correct
Best Practices
Use Clear Descriptions
Use Clear Descriptions
Always provide clear reasons for allowances and charges:✓ Good:✗ Poor:
Choose the Right Level
Choose the Right Level
Document level: When the allowance/charge applies to the entire order
- Early payment discounts
- Shipping for the entire order
- Order-wide promotional discounts
- Bulk discount on one specific product
- Special handling for fragile items
- Product-specific promotions
Calculate Carefully
Calculate Carefully
When calculating percentage-based discounts, ensure accuracy:
Match Tax Categories
Match Tax Categories
Ensure allowances and charges use appropriate tax categories that match the items they apply to.
Document Payment Terms
Document Payment Terms
When offering early payment discounts, document the terms clearly: