Skip to content
Log in

Peppol Network - Send self-billing

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.

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

2. Create a self-billed invoice (IssuedSelfInvoice)

Section titled “2. Create a self-billed invoice (IssuedSelfInvoice)”

To issue a self-billing invoice via API:

  1. Use POST /accounts/{account}/invoices.
  2. Set invoice.type to IssuedSelfInvoice.
  3. Ensure that the Contact transport_type_code is set to peppol and provide the pin_scheme and pin_value.

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)

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

Section titled “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}

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).
  • 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.
  • 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 sandbox between two test accounts (use staging for large or cross-system flows).
  • Verify both the JSON API responses and sent UBL files.
  • Monitor the integration logs (API requests) for payloads, responses, and error details.