Self-billing via Peppol

Self-billing allows buyers to issue invoices on behalf of suppliers.
B2Brouter represents self-billing as:

Outbound: IssuedSelfInvoice via Peppol BIS3 Self-Billing.
Inbound: ReceivedSelfInvoice received over Peppol with reception enabled on the supplier's account.

1. Preparation

See the parent guide Send an invoice through Peppol for an overview and transport configuration details.

2. Create a self-billed invoice (IssuedSelfInvoice)

To issue a self-billing invoice via API:

  1. Use POST /accounts/{account}/invoices (see Via JSON payload).
  2. Set invoice.type to IssuedSelfInvoice.

Behavior:

  • B2Brouter creates an IssuedSelfInvoice.
  • When sending over Peppol, B2Brouter generates a UBL BIS3 Self-Billing Invoice (xml.ubl.invoice.bis3.selfbilling):
    • The supplier in the UBL is your contact.
    • The customer in the UBL is your company (account).
  • The response JSON includes:
    • "type": "IssuedSelfInvoice"
    • "document_type_code": "xml.ubl.invoice.bis3.selfbilling" (read-only field showing the format used)
  • If the receiver cannot receive the self-billing invoice format, B2Brouter will fall back to the default transport (B2Brouter) and document type (pdf.invoice). Be careful with this fallback.

You can also send self-billed invoices through other transports (for example, internal B2Brouter).
However, if the contact and country configuration support Peppol self-billing, we recommend using Peppol because it provides better interoperability and traceability.

3. Listing and fetching self-billed invoices

Use standard invoice endpoints with the type filter:

  • type=IssuedSelfInvoice – List self-billed invoices you issued
  • type=ReceivedSelfInvoice – List self-billed invoices you received

List invoices:
GET /accounts/{ACCOUNT_ID}/invoices?type=IssuedSelfInvoice

Fetch invoice:
GET /invoices/{INVOICE_ID}

4. Tax reporting

Self-billed invoices are included in tax reports (Verifactu, etc.) under the same rules as regular invoices:

  • If a tax report is enabled for the company (e.g., Verifactu in Spain), self-billed invoices are reported automatically when applicable.
  • In Verifactu, self-billing is reported in the name of the emitting company (Buyer).
  • For country-specific details (codes, fields, edge cases), see the corresponding tax report guide (for example, the Verifactu guide).
  • Additional tax-reporting behavior (e.g., Verifactu in Spain) may apply to self-billed invoices depending on the tax report settings of the emitting account.
  • Self-billed invoices from sellers not subject to Verifactu are excluded from reporting.

5. Constraints and known limitations

  • Invoice type vs document type

    • Self-billing always uses invoice.type = IssuedSelfInvoice for outbound documents.
    • Attempting to send a regular IssuedInvoice using a self-billing document type (e.g., through a misconfigured contact) will fail with a 4xx error:
      • "The self-billing document type cannot be used for ordinary invoices."
  • Document type selection

    • document_type_code on the invoice is read-only.
    • The effective document type is determined by:
      • The contact configuration (transport_type_code, document_type_code), and/or
      • Peppol SMP capabilities of the supplier.

Recommendations for production use:

  • Test end-to-end in staging between two test accounts.
  • Verify both the JSON API responses and sent UBL files.
  • Monitor the integration logs (API requests) for payloads, responses, and error details.