E-invoicing

Snipcart can generate EN 16931-compliant electronic invoices in the Factur-X / ZUGFeRD hybrid format: a PDF/A-3b file that is both a human-readable invoice and a machine-readable one, thanks to a structured XML version of the invoice (CII) embedded inside the PDF. A single file satisfies both the French Factur-X and the German ZUGFeRD standards (EN 16931 / Comfort profile).

Once enabled, the e-invoice of every paid order is attached to the order confirmation email and can be retrieved through the REST API — no change to your storefront is required. Refunds on e-invoiced orders get matching credit notes, and orders placed with deferred payments are covered too.

Activating e-invoicing

In the merchant dashboard, go to Store settings → Orders & invoices → E-invoicing and hit the Configure button.

Before e-invoicing can be enabled, your business VAT number and your complete business address (address, city, postal code, and country) must be filled in your account's business information. The Enable e-invoicing toggle stays disabled until they are — an e-invoice without a fully identified seller would not be compliant.

E-invoicing is configured per environment (Test / Live). We recommend enabling it in Test first to validate your setup, then enabling it in Live. See Test/Live environments for details on environments.

Configuration options

Zero-rate untaxed items

Disabled by default. When parts of an order — items or shipping — are not covered by any tax rate, this option emits them on the e-invoice under VAT category Z (zero-rated, 0%).

When the option is off, no e-invoice is generated for such orders: without a VAT treatment for every line, a legally complete invoice can't be produced. Either enable this option, or make sure every product and shipping fee is covered by a tax rate.

Buyer VAT number custom field

Optional. The name of an order custom field where your business customers can type their VAT number at checkout.

When the field is present on an order and its value is shaped like a valid VAT identifier (a country prefix followed by digits — spaces, dots, and dashes are tolerated and normalized), it is included on the e-invoice as the buyer's VAT registration. Malformed values are silently omitted; they never block invoice generation.

Payment terms for pay-later orders

Optional. A free text of up to 500 characters describing your payment terms, included in the machine-readable XML of every invoice issued with an amount due — see Deferred payments. When left blank, Snipcart uses "Payable upon receipt", localized to the order's language.

This setting only affects the embedded XML. To also display your payment terms on the visible page of the PDF, add the text to your invoice email template — see Customizing the invoice for email vs PDF.

Test invoice

The Download a test invoice button generates a sample e-invoice from a fabricated order, using your real invoice template and business information. Use it to validate your setup and the look of the PDF without placing an order. It works even before e-invoicing is enabled, as long as your business information is complete. The Download a test credit note button next to it does the same for credit notes — it generates a sample credit note from your current template and business information, without placing an order or issuing a refund.

How it works

Once e-invoicing is enabled:

  • Every paid order — including recurring subscription orders — generates its e-invoice automatically in the background, shortly after checkout. Orders placed with deferred payments are covered too — see Deferred payments. Generation never delays or blocks the order or your customer.
  • The PDF is attached to the order confirmation email sent to the customer.
  • The e-invoice is generated once and is immutable afterwards.
  • The VAT breakdown of the e-invoice is driven by your tax rates' VAT category and exemption reason — see Taxes for details.

Credit notes for refunds

When you refund an order that has an e-invoice, Snipcart generates an EN 16931-compliant credit note for the refund, in the same Factur-X / ZUGFeRD hybrid format — a PDF with the structured XML version embedded — referencing the number of the original invoice.

  • The credit note is attached to the refund notification email sent to your customer (sent when your store's automatic invoice sending setting is enabled).
  • In the merchant dashboard, each refund on the order page has a Download credit note {number} (PDF) link.
  • The reason for the refund appears on the credit note — on the visible page and in the embedded XML — only when Include reason in the customer notification email was checked when the refund was issued.
  • For partial refunds, the VAT on the refunded amount is allocated pro-rata across the order's tax rates.

Credit note numbering is activated automatically when e-invoicing is enabled. By default credit notes follow the invoice number sequence; a dedicated series with its own prefix can be configured — see Store configuration.

Credit notes can also be retrieved through the REST API — see Retrieving credit notes.

Deferred payments

E-invoices are also generated for orders placed with deferred payments. When the order has not been paid yet at the time the invoice is issued, the invoice carries the full amount as due — with zero prepaid — along with payment terms, as EN 16931 requires.

The payment terms come from the Payment terms for pay-later orders (optional) setting — see Payment terms for pay-later orders. When the setting is left blank, Snipcart uses "Payable upon receipt", localized to the order's language.

An issued invoice is immutable: it is not reissued or resent when the order is later marked as paid. Corrections happen through credit notes:

  • refunding a deferred order that is still unpaid produces a credit note carrying the credited amount as due — it offsets the open invoice;
  • refunding after the order was marked as paid produces a credit note whose amount is already settled.

Retrieving e-invoices with the API

An order's e-invoice can be retrieved through the REST API:

Resource URL

GET https://app.snipcart.com/api/v3/orders/{token}/invoice

The request must be authenticated with your secret API key — see Authentication. The endpoint returns the PDF file (200), or 404 while no e-invoice exists for the order — because it hasn't been generated yet, e-invoicing is disabled, or generation failed. Integrations can simply poll the endpoint until it returns 200.

Example request

curl -H "Accept: application/pdf" \
  "https://app.snipcart.com/api/v3/orders/{token}/invoice" \
  -u {API_KEY}: \
  -o invoice.pdf

Retrieving credit notes

An order's credit notes are retrieved the same way, with your secret API key:

GET https://app.snipcart.com/api/v3/orders/{token}/credit-notes

Lists the order's refunds — each with its refundId, creditNoteNumber, amount, creationDate, and a hasCreditNote flag.

GET https://app.snipcart.com/api/v3/orders/{token}/credit-notes/{refundId}

Returns the refund's credit note PDF (200), or 404 while no credit note exists for the refund — because generation is still pending, it failed, or credit note numbering was not active. Integrations can poll the endpoint until it returns 200.

France: transmission through your PDP

Snipcart generates EN 16931-compliant invoices but does not transmit them. Under the French mandate, transmission must go through your own plateforme agréée (PDP): retrieve each order's e-invoice and credit notes from the API above and submit them through that platform — credit notes are retrieved and submitted the same way as invoices.

Customizing the invoice for email vs PDF

The e-invoice PDF is rendered from the same invoice template as the order confirmation email — the customizable template documented in Invoices email template.

The template receives a context variable telling it where it is being rendered: 'Email' when rendered for the order confirmation email, 'Pdf' when rendered as the (e-)invoice PDF, and 'Html' for in-browser views.

Use it with the if_eq helper to show content only in the email — recommended for greetings, marketing links, or "view your order history" links, which don't belong on a legal invoice document:

{{#if_eq context 'Email'}}
  

Hi {{ order.billingAddress.fullName }}, thanks for your order!

View your order history {{/if_eq}}

The same pattern works the other way around — content wrapped in {{#if_eq context 'Pdf'}} … {{/if_eq}} only appears on the invoice PDF, which is handy for invoice-only content such as a legal footer:

{{#if_eq context 'Pdf'}}
  

Registered office: 123 Main Street, Springfield — Company No 12345678

{{/if_eq}}

Was this article helpful?