Discussions
invoice_lines_attributes > VAT category E & G : error converting to Peppol BIS3 Invoice
yesterday
Hello!
I would like to create an invoice with those 3 specific margin scheme :
- Standard : 20%
- Margin scheme VAT - specific scheme for travel agencies
- Exempt : e.g international flight tickets
When creating the invoice, i got the error :
{
"error": "Cannot send invoice I-009: FATAL: [BR-E-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is \"Exempt from VAT\" shall contain exactly one VAT breakdown (BG-23) with the VAT category code (BT-118) equal to \"Exempt from VAT\". {\"id\"=>\"BR-E-01\", \"flag\"=>\"fatal\", \"location\"=>\"/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]\"}, FATAL: [BR-E-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is \"Exempt from VAT\" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are \"Exempt from VAT\". {\"id\"=>\"BR-E-08\", \"flag\"=>\"fatal\", \"location\"=>\"/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:TaxTotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:TaxSubtotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][2]/*:TaxCategory[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]\"}, FATAL: [BR-E-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is \"Exempt from VAT\" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are \"Exempt from VAT\". {\"id\"=>\"BR-E-08\", \"flag\"=>\"fatal\", \"location\"=>\"/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:TaxTotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:TaxSubtotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][3]/*:TaxCategory[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]\"}"
}
On the APP:
Indeed, in the XML generated I have two TaxSubtotal with category E.
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>I-009</cbc:ID>
<cbc:IssueDate>2025-09-24</cbc:IssueDate>
<cbc:DueDate>2025-10-24</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cac:OrderReference>
<cbc:ID>.</cbc:ID>
</cac:OrderReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="0208">0743849943</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>Railtrip Travel</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>123 South Avenue</cbc:StreetName>
<cbc:CityName>Bruxelles</cbc:CityName>
<cbc:PostalZone>1000</cbc:PostalZone>
<cbc:CountrySubentity>Bruxelles</cbc:CountrySubentity>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>0743849943</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>ZZZ</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Railtrip Travel</cbc:RegistrationName>
<cbc:CompanyID schemeID="0208">0743849943</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Telephone>0600000000</cbc:Telephone>
<cbc:ElectronicMail>[email protected]</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="EM">[email protected]</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>Majeos srl</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0714994126</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName languageID="fr">Majeos srl</cbc:RegistrationName>
<cbc:CompanyID schemeID="0208">0714994126</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:ElectronicMail>[email protected]</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="EUR">20.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">100.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">20.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>20.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">500.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">0.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>E</cbc:ID>
<cbc:Percent>0.00</cbc:Percent>
<cbc:TaxExemptionReason>Exonération de TVA – Article 262 II-2° du CGI.</cbc:TaxExemptionReason>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">800.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">0.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>E</cbc:ID>
<cbc:Percent>0.00</cbc:Percent>
<cbc:TaxExemptionReason>TVA sur marge – Article 266 d du CGI – TVA non récupérable.</cbc:TaxExemptionReason>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="EUR">1400.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="EUR">1400.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="EUR">1420.00</cbc:TaxInclusiveAmount>
<cbc:PayableAmount currencyID="EUR">1420.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="EA">1.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">800.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Name>Forfait touristique X</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>E</cbc:ID>
<cbc:Percent>0.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">800.0</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>2</cbc:ID>
<cbc:InvoicedQuantity unitCode="EA">1.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">100.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Name>Honoraires d’organisation</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>20.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">100.0</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>3</cbc:ID>
<cbc:InvoicedQuantity unitCode="EA">1.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">500.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Name>Billet d’avion Paris–NY</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>E</cbc:ID>
<cbc:Percent>0.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">500.0</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>
Here is the full payload :
Route : https://api-staging.b2brouter.net/accounts/250701/invoices
API Version : 2025-10-13
{
"send_after_import": true,
"invoice": {
"type": "IssuedInvoice",
"bank_account": {
"type": "iban"
},
"terms": "custom",
"invoice_lines_attributes": [
{
"unit": 1,
"quantity": 1,
"description": "Forfait touristique X",
"price": 800,
"taxes_attributes": [
{
"name": "VAT",
"category": "E",
"percent": 0,
"comment": "TVA sur marge – Article 266 d du CGI – TVA non récupérable."
}
]
},
{
"unit": 1,
"quantity": 1,
"description": "Honoraires d’organisation",
"price": 100,
"taxes_attributes": [
{
"name": "VAT",
"category": "S",
"percent": 20
}
]
},
{
"unit": 1,
"quantity": 1,
"description": "Billet d’avion international Paris–NY",
"price": 500,
"taxes_attributes": [
{
"name": "VAT",
"category": "G",
"percent": 0,
"comment": "Exonération de TVA – Article 262 II-2° du CGI."
}
]
}
],
"apply_taxes_to_charge": false,
"charge_is_reimbursable_expense": false,
"number": "I-009",
"contact_id": 1313382006,
"date": "2025-09-24",
"due_date": "2025-10-24"
}
}
What do you suggest?
Thank you very much !
Alexandre