Overview
To send or receive e-invoices, an organization needs to be registered on the e-invoicing network. Tesouro API allows you to automatically register your organizations on the PEPPOL e-invoicing network in just a few minutes. Once done, all e-invoices sent to the organization via PEPPOL will arrive directly to the organization’s accounts payable in Tesouro.Requirements
- The organization must be from a supported country.
- The organization must not already be registered in PEPPOL through another platform.
Considerations
Roles and permissions
The/einvoicing-connections* endpoints mentioned in this guide can be called both with app tokens and organization user tokens.
Organization users do not need any special permissions.
Register an organization in PEPPOL
Depending on the organization’s country, you can register the organization in PEPPOL using its business number or VAT number or both. Refer to the list of supported schemes.If an organization has both the business number and VAT number, which one to use for PEPPOL registration?The country-specific regulations are as follows:
- Belgium Peppol authority requires using the business number (KBO/BCE number) as the primary identifier.
- Dutch Peppol authority recommends registering both KVK and VAT number.

Register using VAT ID
If the organization’s VAT number has been added as a VAT ID in Tesouro, you can register the organization in PEPPOL using this VAT ID. To do this, callPOST /einvoicing-connections and specify the UUID of the organization’s VAT ID and the address to be listed in the pubic PEPPOL directory.
The address would typically be the same as the address specified in the organization object, but can be different if needed.
address.country specified in this request (rather than from the country of the VAT ID object).
For example, DE:VAT for Germany or NL:VAT for the Netherlands.
The PEPPOL ID assigned to the organization will be:
9925:BE<vat number digits>for Belgium organizations, e.g.9925:BE01234567899944:NL<vat number>for Dutch organizations, e.g.9944:NL123456789B129930:DE<vat number digits>for German organizations, e.g.9930:DE123456789
credentials[].id value returned in the response - you will need it later when creating e-invoices on behalf of this organization.
Register other identifiers
This approach can be used to register an organization’s business number (such as Dutch KVK) as its PEPPOL identifier. If you have not created an e-invoicing connection for the organization yet, create one by callingPOST /einvoicing-connections.
In the request body, specify the organization’s address to be listed in the public PEPPOL directory.
This address would typically be the same as the address specified in the organization object, but can be different if needed.
id of the e-invoicing network connection:
POST /einvoicing-connections/{connection_id}/network-credentials and specify the PEPPOL scheme name and the organization’s identifier corresponding to that scheme:
id of the organization’s PEPPOL identifier.
You will need this id later when creating e-invoices on behalf of the organization.
<code> is the ICD code corresponding to the network_credentials_schema used.
Registration errors
If the same VAT ID or business number is already registered in PEPPOL, the abovementioned API calls return an HTTP 422 error. You can usually encounter this error in the sandbox environment when trying to register random test identifiers that are already registered by other participants. 422 status is also returned if the specified identifier has incorrect length or format.Sample error responses
Sample error responses
PEPPOL identifier already registered:Incorrect identifier length:
Check e-invoicing onboarding status
Organization registration in PEPPOL is usually immediate. After at least one PEPPOL identifier has been registered, thestatus of the e-invoicing connection will be active.
This means the organization can both send and receive e-invoices.
To check e-invoicing status, call GET /einvoicing-connections/{connection_id} and examine the status value in the response:
status can be pending if you called POST /einvoicing-connections with only address and did not register any PEPPOL identifier afterwards.
This is indicated by an empty credentials array in the e-invoicing connection object.
To resolve the issue, call POST /einvoicing-connections/{connection_id}/network-credentials to register a PEPPOL identifier for the organization.
If the status is inactive or failed, contact us for assistance.
Update or remove a PEPPOL ID
Currently there is no way to update or remove existing PEPPOL IDs of an organization. As a workaround, you can delete the e-invoicing connection and re-create it with the correct PEPPOL IDs. However, this temporarily terminates the organization’s PEPPOL registration which may be undesirable.Offboarding: Deregister an organization from PEPPOL
If an organization is no longer your customer or does not want to use e-invoicing through the Tesouro platform, you can offboard this organization by deleting its e-invoicing connection. To do this, callDELETE /einvoicing-connections/{einvoicing_connection_id}.
This terminates the organization’s registration in PEPPOL, deletes its PEPPOL IDs, and removes the organization from the PEPPOL directory.
The organization will no longer receive PEPPOL e-invoices into the Tesouro platform, and cannot send e-invoices as well.
Deregistration is usually immediate but may take up to one hour.