Use case / E-invoicing
Webhooks / Inbound

Send E-Invoices

Webhook to receive e-invoices in structured format or as file uploads.

Supported Formats

This endpoint accepts e-invoices in multiple formats:

  • JSON payloads: Structured data using application/json content type.
  • XML payloads: Structured data using application/xml content type. Must be a valid UBL document.
  • File uploads: JSON + binary files (PDF, XML, etc.) using multipart/form-data.

Multipart Upload Support

When using multipart form data, the endpoint expects:

  • First part: JSON document (PurchaseEInvoiceInput or PurchaseECreditNoteInput). XML is not supported at the moment.
  • Subsequent parts: Supporting documents (invoice PDF, CMR PDF, etc.).

Examples

JSON payload example (application/json).

{
  "name": "INV-2023-001",
  "date": "2023-01-15",
  "due_date": "2023-02-15",
  "invoice_type": "PURCHASE",
  "currency": "EUR",
  "total_excl_tax": 999.99,
  "total_incl_tax": 1209.99,
  "total_tax": 210.00,
  "custom_fields": {},
  "supplier": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Supplier Company Ltd",
    "vat_number": "BE1234.123.123",
    "billing_location": {
      "address": "Gaston Crommenlaan 4",
      "city": "Gent",
      "postal_code": "9050",
      "country": "BE"
    }
  },
  "customer_reference_numbers": ["12345"],
  "line_items": [
    {
      "description": "International freight transport",
      "amount": 999.99,
      "currency": "EUR",
      "tax_rate": {
        "percentage": 21.0,
        "name": "21% VAT",
        "tax_type": "VAT"
      },
      "account": {
        "code": "6000"
      },
      "references": {
        "order_name": "OR-1234"
      }
    }
  ],
  "attachments": [
    {
      "document": {
        "base64": "JVBERi0xLjQKJcfs... (truncated for brevity) ...",
        "content_type": "application/pdf",
        "document_type": "INVOICE",
        "filename": "invoice_123.pdf"
      }
    }
  ]
}

Credit note example (application/json). Note: credit notes do not have a due_date field.

{
  "name": "CN-2023-001",
  "date": "2023-03-01",
  "invoice_type": "PURCHASE_CREDIT_NOTE",
  "currency": "EUR",
  "total_excl_tax": -200.00,
  "total_incl_tax": -242.00,
  "total_tax": -42.00,
  "supplier": {
    "name": "Supplier Company Ltd",
    "vat_number": "BE1234.123.123"
  },
  "customer_reference_numbers": ["12345"],
  "line_items": [
    {
      "amount": -200.00,
      "currency": "EUR",
      "tax_rate": {
        "percentage": 21.0,
        "tax_type": "VAT"
      },
      "account": {
        "code": "6000"
      }
    }
  ]
}

XML payload example (application/xml).

<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>25900027</cbc:ID>
    <cbc:IssueDate>2025-10-28</cbc:IssueDate>
    <cbc:DueDate>2025-10-28</cbc:DueDate>
    <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
    <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
    <cbc:BuyerReference>25900027</cbc:BuyerReference>
    <cac:AdditionalDocumentReference>
        <cbc:ID>600947</cbc:ID>
        <cac:Attachment>
            <cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="25900027.pdf">JVBERi0xLjQKJcfs... (truncated for brevity) ...</cbc:EmbeddedDocumentBinaryObject>
        </cac:Attachment>
    </cac:AdditionalDocumentReference>
    <cac:AccountingSupplierParty>
        <cac:Party>
        <cbc:EndpointID schemeID="0208">0564730040</cbc:EndpointID>
        <cac:PartyName>
            <cbc:Name>qargo-peppol-dev</cbc:Name>
        </cac:PartyName>
        <cac:PostalAddress>
            <cbc:StreetName>Gaston Crommenlaan 4</cbc:StreetName>
            <cbc:CityName>Gent</cbc:CityName>
            <cbc:PostalZone>9050</cbc:PostalZone>
            <cbc:CountrySubentity>Oost-Vlaanderen</cbc:CountrySubentity>
            <cac:Country>
            <cbc:IdentificationCode>BE</cbc:IdentificationCode>
            </cac:Country>
        </cac:PostalAddress>
        <cac:PartyTaxScheme>
            <cbc:CompanyID>BE0772640434</cbc:CompanyID>
            <cac:TaxScheme>
            <cbc:ID>VAT</cbc:ID>
            </cac:TaxScheme>
        </cac:PartyTaxScheme>
        <cac:PartyLegalEntity>
            <cbc:RegistrationName>qargo-peppol-dev</cbc:RegistrationName>
            <cbc:CompanyID schemeID="0208">0564730040</cbc:CompanyID>
        </cac:PartyLegalEntity>
        <cac:Contact>
            <cbc:Telephone>+324854244512</cbc:Telephone>
            <cbc:ElectronicMail>simon@qargo.com</cbc:ElectronicMail>
        </cac:Contact>
        </cac:Party>
    </cac:AccountingSupplierParty>
    <cac:AccountingCustomerParty>
        <cac:Party>
        <cbc:EndpointID schemeID="0208">0772640434</cbc:EndpointID>
        <cac:PartyName>
            <cbc:Name>Qargo</cbc:Name>
        </cac:PartyName>
        <cac:PostalAddress>
            <cbc:StreetName>Gaston Crommenlaan 4</cbc:StreetName>
            <cbc:CityName>Gent</cbc:CityName>
            <cbc:PostalZone>9050</cbc:PostalZone>
            <cac:Country>
            <cbc:IdentificationCode>BE</cbc:IdentificationCode>
            </cac:Country>
        </cac:PostalAddress>
        <cac:PartyLegalEntity>
            <cbc:RegistrationName languageID="nl">Qargo</cbc:RegistrationName>
            <cbc:CompanyID schemeID="0208">0772640434</cbc:CompanyID>
        </cac:PartyLegalEntity>
        </cac:Party>
    </cac:AccountingCustomerParty>
    <cac:TaxTotal>
        <cbc:TaxAmount currencyID="EUR">162.71</cbc:TaxAmount>
        <cac:TaxSubtotal>
        <cbc:TaxableAmount currencyID="EUR">774.83</cbc:TaxableAmount>
        <cbc:TaxAmount currencyID="EUR">162.71</cbc:TaxAmount>
        <cac:TaxCategory>
            <cbc:ID>S</cbc:ID>
            <cbc:Percent>21.00</cbc:Percent>
            <cac:TaxScheme>
            <cbc:ID>VAT</cbc:ID>
            </cac:TaxScheme>
        </cac:TaxCategory>
        </cac:TaxSubtotal>
    </cac:TaxTotal>
    <cac:LegalMonetaryTotal>
        <cbc:LineExtensionAmount currencyID="EUR">774.83</cbc:LineExtensionAmount>
        <cbc:TaxExclusiveAmount currencyID="EUR">774.83</cbc:TaxExclusiveAmount>
        <cbc:TaxInclusiveAmount currencyID="EUR">937.54</cbc:TaxInclusiveAmount>
        <cbc:PayableAmount currencyID="EUR">937.54</cbc:PayableAmount>
    </cac:LegalMonetaryTotal>
    <cac:InvoiceLine>
        <cbc:ID>1</cbc:ID>
        <cbc:InvoicedQuantity unitCode="EA">1.0</cbc:InvoicedQuantity>
        <cbc:LineExtensionAmount currencyID="EUR">65.00</cbc:LineExtensionAmount>
        <cac:Item>
        <cbc:Name>Administratiekost</cbc:Name>
        <cac:ClassifiedTaxCategory>
            <cbc:ID>S</cbc:ID>
            <cbc:Percent>21.00</cbc:Percent>
            <cac:TaxScheme>
            <cbc:ID>VAT</cbc:ID>
            </cac:TaxScheme>
        </cac:ClassifiedTaxCategory>
        </cac:Item>
        <cac:Price>
        <cbc:PriceAmount currencyID="EUR">65.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">709.83</cbc:LineExtensionAmount>
        <cac:Item>
        <cbc:Name>Transport charge</cbc:Name>
        <cac:ClassifiedTaxCategory>
            <cbc:ID>S</cbc:ID>
            <cbc:Percent>21.00</cbc:Percent>
            <cac:TaxScheme>
            <cbc:ID>VAT</cbc:ID>
            </cac:TaxScheme>
        </cac:ClassifiedTaxCategory>
        </cac:Item>
        <cac:Price>
        <cbc:PriceAmount currencyID="EUR">709.83</cbc:PriceAmount>
        </cac:Price>
    </cac:InvoiceLine>
</Invoice>

Multipart Form Data example.

POST /v1/webhook/e-invoicing
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryABC123XYZ

----WebKitFormBoundaryABC123XYZ
Content-Disposition: form-data; name="document"; filename="invoice_data.json"
Content-Type: application/json

{
  "name": "INV-2023-001",
  "date": "2023-01-15",
  "due_date": "2023-02-15",
  "invoice_type": "PURCHASE",
  "currency": "EUR",
  "total_excl_tax": 999.99,
  "total_incl_tax": 1209.99,
  "total_tax": 210.00,
  "custom_fields": {},
  "supplier": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Supplier Company Ltd",
    "vat_number": "BE1234.123.123",
    "billing_location": {
      "address": "Gaston Crommenlaan 4",
      "city": "Gent",
      "postal_code": "9050",
      "country": "BE"
    }
  },
  "customer_reference_numbers": ["12345"],
  "line_items": [
    {
      "description": "International freight transport",
      "amount": 999.99,
      "currency": "EUR",
      "tax_rate": {
        "percentage": 21.0,
        "name": "21% VAT",
        "tax_type": "VAT"
      },
      "account": {
        "code": "6000"
      },
      "references": {
        "order_name": "OR-1234"
      }
    }
  ]
}
----WebKitFormBoundaryABC123XYZ
Content-Disposition: form-data; name="invoice"; filename="invoice_123.pdf"
Content-Type: application/pdf

[binary PDF content]
----WebKitFormBoundaryABC123XYZ
Content-Disposition: form-data; name="cmr"; filename="cmr_document.pdf"
Content-Type: application/pdf

[binary PDF content]
----WebKitFormBoundaryABC123XYZ--

Processing Notes on Multipart Uploads

  • First part must be the JSON document containing invoice/credit note data.
  • Supporting documents follow as additional parts.
  • Content-Type headers determine document processing.
post/v1/webhook/e-invoicing

Request body

OR
OR
string binary required

Example request

{
  "name": "Invoice-0001",
  "date": "2022-01-01",
  "currency": "EUR",
  "exchange_rate": {
    "rate_date": "2022-01-01",
    "rate": 1,
    "inverse_rate": 1
  },
  "supplier": {
    "name": "John Doe",
    "vat_number": "BE1234.123.123",
    "billing_location": {
      "code": "LOC123",
      "display_name": "Main Office",
      "address": "Gaston Crommenlaan 4",
      "city": "Ghent",
      "country": "BE",
      "postal_code": "9050",
      "name": "Qargo HQ"
    }
  },
  "customer_reference_numbers": [
    "12345"
  ],
  "line_items": [
    {
      "description": "Charge description",
      "account": {
        "code": "200"
      },
      "tax_rate": {
        "name": "21%",
        "percentage": 21,
        "code": "21% VAT"
      },
      "currency": "USD",
      "references": {
        "order_name": "OR-1234"
      }
    }
  ],
  "due_date": "2022-01-01"
}

Response

Successful Response

{"stackTrail":"paths:/v1/webhook/e-invoicing:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes

No recorded changes to this endpoint across all 1 revision of this API.