Seller and buyer
The parties of an invoice: the seller (BG-4), the buyer (BG-7), a payee (BG-10) and a tax representative (BG-11). Each snippet replaces one part of the base invoice; imports are as on that page.
Seller
The electronic address (endpointId, BT-34) is where Peppol delivers documents to the seller; its schemeId comes from the EAS code list. The VAT identifier (BT-31) starts with the country code.
const seller: InvoiceInput['accountingSupplierParty'] = {
party: {
endpointId: { schemeId: '0088', value: '7300010000001' },
partyIdentification: [{ id: '99887766' }],
partyName: { name: 'SupplierTradingName Ltd.' },
postalAddress: {
streetName: 'Main street 1',
additionalStreetName: 'Postbox 123',
cityName: 'London',
postalZone: 'GB 123 EW',
country: { identificationCode: 'GB' },
},
partyTaxScheme: [{ companyId: 'GB1232434' }],
partyLegalEntity: {
registrationName: 'SupplierOfficialName Ltd',
companyId: 'GB983294',
companyLegalForm: 'Share capital 100000 GBP',
},
contact: {
name: 'John Smith',
telephone: '+44 20 7946 0000',
electronicMail: 'ar@supplier.example',
},
},
};Defaulted: taxScheme: { id: 'VAT' } on each partyTaxScheme.
Buyer
The buyer has the same parts. A buyer's VAT identifier (BT-48) is needed for reverse charge and intra-community supplies; see VAT.
const buyer: InvoiceInput['accountingCustomerParty'] = {
party: {
endpointId: { schemeId: '0002', value: '4598375937' },
partyIdentification: { id: { schemeId: '0002', value: 'FR23342' } },
partyName: { name: 'BuyerTradingName AS' },
postalAddress: {
streetName: 'Hovedgatan 32',
cityName: 'Stockholm',
postalZone: '456 34',
country: { identificationCode: 'SE' },
},
partyTaxScheme: { companyId: 'SE4598375937' },
partyLegalEntity: {
registrationName: 'Buyer Official Name',
companyId: { schemeId: '0183', value: '39937423947' },
},
contact: { name: 'Lisa Johnson', telephone: '23434234', electronicMail: 'lj@buyer.se' },
},
};Note that a buyer has at most one partyIdentification and one partyTaxScheme, so they are objects, where the seller's are arrays.
Payee
State a payee only when someone other than the seller receives the payment, such as a factoring company. Its name (BT-59) is required.
const payeeParty: InvoiceInput['payeeParty'] = {
partyIdentification: { id: { schemeId: '0088', value: '7300010000001' } },
partyName: { name: 'Payee Factoring AB' },
partyLegalEntity: { companyId: '5560360793' },
};Tax representative
A seller without a VAT registration in the buyer's country can name a tax representative, with its name (BT-62), address with country (BT-69) and VAT identifier (BT-63).
const taxRepresentativeParty: InvoiceInput['taxRepresentativeParty'] = {
partyName: { name: 'Tax Representative Ltd' },
postalAddress: { cityName: 'Stockholm', country: { identificationCode: 'SE' } },
partyTaxScheme: { companyId: 'SE556036079301' },
};Defaulted: taxScheme: { id: 'VAT' }.