Peppol Network - Send self-billing
Ce contenu n’est pas encore disponible dans votre langue.
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
Section titled “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)
Section titled “2. Create a self-billed invoice (IssuedSelfInvoice)”To issue a self-billing invoice via API:
- Use
POST /accounts/{account}/invoices. - Set
invoice.typetoIssuedSelfInvoice. - Ensure that the Contact
transport_type_codeis set topeppoland provide thepin_schemeandpin_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 issuedtype=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
Section titled “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). - 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.
- In Verifactu, only self-billed invoices from sellers whose country is Spain are reported. Self-billed invoices from sellers in other countries are excluded from reporting.
5. France: respond to and pay a self-billed invoice
Section titled “5. France: respond to and pay a self-billed invoice”In France, between two French companies over Peppol, every response to a self-billed invoice reaches the other party as a CDV status. As the seller, you respond to a ReceivedSelfInvoice with POST /invoices/{id}/mark_as, with any API version:
| Call | CDV the buyer receives |
|---|---|
state: "accepted" | 205:Approuvée |
state: "refused" + reason_code | 210:Refusée |
state: "paid" | 212:Encaissée, which also goes to the PPF. Only for services with the TVA due on collection |
As the buyer, when you mark an IssuedSelfInvoice as paid (mark_as with state: "paid", or with recorded payments), B2Brouter sends the 211:Paiement transmis to the seller. It does not go to the DGFiP, and no 212 is sent.
The payment statuses depend on who is the buyer and who is the seller, not on who issued the invoice. The rules, and the events B2Brouter records when it does not send the 212, are in Self-billed invoices: who sends 211 and 212.
6. Constraints and known limitations
Section titled “6. Constraints and known limitations”-
Invoice type vs document type
- Self-billing always uses
invoice.type = IssuedSelfInvoicefor outbound documents. - Attempting to send a regular
IssuedInvoiceusing a self-billing document type (e.g., through a misconfigured contact) will fail with a4xxerror:"The self-billing document type cannot be used for ordinary invoices."
- Self-billing always uses
-
Document type selection
document_type_codeon 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.
- The contact configuration (
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.