Peppol

For creditors outside Sweden, Finland and Norway, a billogram sent with the delivery method EDI is delivered as a Peppol BIS Billing 3.0 e-invoice.

In the API Reference, fields that end up in the Peppol invoice carry a Peppol: line naming the EN 16931 business term (BT-…) they fill. Fields without that line are not sent to the buyer.

Sweden, Finland and Norway: EDI for these creditors goes through a different channel until it moves to the one described here. A few fields map differently there: info.your_reference, info.our_reference, the address fields careof and attention, and zero-VAT reasons.


Before You Send

EDI must be activated for your account. Contact Billogram support to enable it.

The billogram is rejected at send time unless:

  • The customer is a business (customer.company_type business or foreign business). EDI is not supported for individuals.
  • customer.org_no is set. Not required for German customers.
  • The customer has an address.
  • It has no reminder fee and no interest fee.

Reminders are never sent with EDI.


Identifying the Buyer

The invoice is routed to the buyer's Peppol address:

  1. customer.edi.electronic_id, if set. Use the format {scheme}:{id}, where scheme is the 4-digit Peppol identifier code, e.g. 0208:0805843831 for a Belgian company number. If the billogram has no value, the one stored on the customer object is used.
  2. Otherwise, Billogram looks the buyer up in the Peppol directory using customer.org_no and customer.vat_no. A customer in Germany can be found from customer.vat_no alone.

If neither finds the buyer, delivery fails. Exception: a German buyer that is not on Peppol receives a ZUGFeRD invoice by email instead. A German buyer with neither customer.vat_no nor customer.edi.electronic_id is delivered the same way.


Field Mapping

Fields on the billogram, unless marked as the customer object.

Invoice

Business term API field
BT-1 Invoice number invoice_no
BT-2 Invoice issue date invoice_date
BT-9 Payment due date due_date
BT-10 Buyer reference customer.edi.reference, else info.your_reference
BT-13 Purchase order reference info.order_no
BT-19 Buyer accounting reference info.reference_number
BT-22 Invoice note customer.edi.note, else info.message, followed by info.footer_text and your company details
BT-25 Preceding invoice reference reference_invoice_no (credit invoices)
BT-26 Preceding invoice issue date reference_invoice_date (credit invoices)
BT-151 VAT category code AE on every line reversed_vat

Invoice Lines

Business term API field
BT-129 Invoiced quantity items[].count
BT-130 Unit of measure items[].unit
BT-134 Line period start date items[].start_date
BT-135 Line period end date items[].end_date
BT-136 Line allowance amount items[].discount
BT-146 Item net price items[].price
BT-152 Item VAT rate items[].vat
BT-153 Item name items[].title
BT-154 Item description items[].description
BT-155 Item seller's identifier items[].item_no

invoice_fee is sent as an extra invoice line.

Buyer

Business term API field
BT-44 Buyer name customer.name
BT-47 Buyer legal registration identifier customer.org_no
BT-48 Buyer VAT identifier customer.vat_no
BT-49 Buyer electronic address customer.edi.electronic_id, else edi.electronic_id on the customer object
BT-50 Buyer address line 1 customer.address.address_line_1 (or deprecated street_address), with address_line_2 appended
BT-52 Buyer city customer.address.city
BT-53 Buyer post code customer.address.zipcode
BT-54 Buyer country subdivision customer.address.administrative_area
BT-55 Buyer country code customer.address.country
BT-56 Buyer contact point info.your_reference, else contact.name on the customer object
BT-57 Buyer contact telephone customer.phone, else contact.phone on the customer object
BT-58 Buyer contact email contact.email on the customer object

Delivery

Business term API field
BT-70 Deliver to party name customer.delivery_address.name
BT-75 Deliver to address line 1 customer.delivery_address.address_line_1 (or deprecated street_address)
BT-76 Deliver to address line 2 customer.delivery_address.address_line_2
BT-77 Deliver to city customer.delivery_address.city
BT-78 Deliver to post code customer.delivery_address.zipcode
BT-79 Deliver to country subdivision customer.delivery_address.administrative_area
BT-80 Deliver to country code customer.delivery_address.country

Fields to Check

  • Buyer reference (BT-10): buyers often use it to route the invoice internally, so ask your customer for it.
  • Invoice note (BT-22): customer.edi.note replaces info.message for EDI only.

Not sent to the buyer: info.our_reference, customer.edi.operator, and the address fields careof and attention.


Tracking Delivery

Outcome Event
Delivered to the buyer's access point EDISent
Delivery failed DeliveryFailed with data.type set to EDIFailed

For a Peppol delivery, a failed event explains why in data.errors (a list of messages), and data.message is null.