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.

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.

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.

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. 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.

Not covered in this version: orders paid with deferred payments, and credit notes for refunds.

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

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 from the API above and submit it through that platform.

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?