Credit Notes
Issue credit notes to correct or cancel previously sent invoices on the Peppol network.
When to Issue a Credit Note
Credit notes are used to partially or fully reverse a previously sent invoice. Common scenarios include:
- Full cancellation — the entire invoice was sent in error
- Partial correction — wrong quantity, price, or VAT rate on some lines
- Returns — goods returned by the buyer
- Post-delivery discount — agreed discount after invoice was sent
Sending a Credit Note
Use peppol.invoices.send() with isCreditNote: true, and set invoiceReference to the number of the original invoice. Send it on every credit note: it is the link that lets your buyer match the credit note to the invoice it corrects.
Fields to Set
invoiceReference— thenumberof the original invoice being credited. Send it on every credit note; who refuses one without it is listed belowinvoiceReferenceDate— the issue date of that invoice,YYYY-MM-DD. Recommended everywhere, and required under the French regime (see below)number— a unique credit note number (e.g.CN-2026-001)to,lines— same as invoice
invoiceReference is refused before anything is sent in three cases:
- by the SDK —
peppol.invoices.send()fails validation oninvoiceReference; - by
POST /v1/invoiceswhen the supplier is Dutch —422 invoices.country_rule_violation, Dutch ruleNL-R-001; - by
POST /v1/invoiceswhen the credit note declares the French regime —400 invoices.france_credit_note_reference_invalid(see below).
In every other case, a direct API call without it is accepted, and getpeppr submits the credit note with no billing reference: nothing links it to the invoice it corrects. Always send it.
French credit notes need the invoice date
A credit note that declares the French regime must give both the number and the issue date of the invoice it credits. French invoicing rule BR-FR-CO-05 ignores a reference without its date. If either is missing, getpeppr refuses the credit note with 400 invoices.france_credit_note_reference_invalid before anything is sent, and the message names the field to add.
Quantities are positive
Write each line as you would on the invoice: a positive quantity and a positive unitPrice. The isCreditNote: true flag is what turns the document into a credit, so getpeppr applies the sign for you. To credit two returned units, send quantity: 2, not -2.
- A zero or negative quantity is refused with
422 invoices.invalid_line_quantity, naming the line, before anything is sent. - To reduce the amount credited, add an allowance to the line or to the document.
invoice.* events, e.g. invoice.sent, invoice.paid).
import { Peppol } from "@getpeppr/sdk";
const peppol = new Peppol({ apiKey: "sk_live_..." });
// A credit note MUST reference the original invoice
const creditNote = await peppol.invoices.send({
number: "CN-2026-001",
isCreditNote: true,
invoiceReference: "INV-2026-042", // required
invoiceReferenceDate: "2026-03-15", // its issue date — required in France
to: { name: "ACMEDIA", peppolId: "0208:0685660237", street: "Avenue Louise 54", city: "Brussels", postalCode: "1050", country: "BE" },
lines: [
{ description: "Arc Reactor Maintenance Q1 — cancelled", quantity: 1, unitPrice: 50_000, vatRate: 21 },
],
paymentTerms: "Refund within 14 days",
paymentIban: "BE68539007547034",
});
console.log(`Credit note sent: ${creditNote.id}`);