Terms and withdrawal as PDF in Shopify order confirmations
How transactional Shopify emails pull terms and withdrawal artifacts from an external delivery source: PDF as attachment, HTML fragment in the template or JSON in your own middleware — versioned and traceable to the order timestamp.
Terms and withdrawal as PDF in Shopify order confirmations
Shopify is a hosted commerce platform: storefront, checkout and the transactional emails run inside the platform itself. The order confirmation is rendered via notification templates that are Liquid-based and do not fetch external content at send time. Writing terms or withdrawal text directly into such a template freezes a version inside the template.
That is exactly why, on Shopify, it makes sense to pull the legal texts from an external delivery source instead of maintaining them in parallel across several templates and languages.
What TermShelf does here — and what it doesn’t
TermShelf is the central source for approved legal texts and delivers them as HTML, JSON or PDF. It is not a legal-text generator and does not claim a ready-made Shopify app. Shopify remains the commerce platform; the approved version is pulled from outside.
Which texts are needed at which step is something teams should have reviewed legally. TermShelf organizes and delivers the approved versions — the legal assessment of the content stays external.
Why static texts in transactional Shopify mails are problematic
Notification templates can be adapted per language and in part per market. With the legal text hard-coded in the template, a maintenance problem appears quickly:
- Each language version of the template has to be updated individually on a change.
- The version sitting in the template is not unambiguously mapped to an approved version.
- Liquid templates do not fetch external content at send time — an “always current” embed directly in the template is therefore not given.
The same drift mechanics are described in preventing legal content drift.
Three integration patterns for Shopify
Because the notification template itself fetches nothing, the retrieval point usually sits in a custom app or middleware logic that reacts to an order event. From there, three artifact forms are available:
- PDF artifact as an email attachment — fetched by the middleware and attached to the confirmation when terms or withdrawal should be enclosed as a self-contained document.
- HTML fragment that the middleware inserts into a mail block or an accompanying page.
- JSON for custom app/middleware logic that further processes text and version info.
When each form fits is compared in delivering legal content via API; the delivery contract is described in the Public Delivery API.
Versioning and the order moment
What matters is the version at the order moment. Because the order event provides a timestamp, the middleware can fetch exactly the state that applied at that moment — via ?effective_at=<ISO-8601> or a fixed ?version=N.
The version number used should be stored with the order. The link between transaction and the applicable version is covered in which terms version applied at contract conclusion.
Example flow
- Edit, review and approve the legal text in TermShelf.
- Publish the version — it becomes an immutable, dated snapshot.
- The middleware reacts to the order event and fetches the right artifact for language, market and order time, e.g. the withdrawal notice as a PDF:
GET /v1/delivery/sites/8/documents/withdrawal/pdf
?locale=en-GB&market=GB&effective_at=2026-05-31T10:24:00ZThe middleware attaches the PDF to the confirmation or inserts the HTML fragment into the mail body, and the delivered version stays traceable via the stored version number. Endpoints are in the API reference.
Common mistakes
- Legal text hard-coded in the Liquid notification template — separate per language and never updated in sync.
- Assuming the template can fetch the text “live” from outside; notification templates do not.
- An app stores its own copy of the texts and ignores the order moment.
- A PDF is attached but without reference to a dated, approved version.
What TermShelf does not do
TermShelf does not produce legally binding content and is not a substitute for legal advice. TermShelf does not claim a ready-made Shopify app or a platform feature not described here. Which retrieval and attachment options are concretely available depends on the chosen app/middleware setup and the platform’s capabilities.
Related guides
Frequently asked questions
- Can a Shopify notification template fetch the legal text live?
- No. Notification templates are Liquid-based and do not fetch external content at send time. The artifact is therefore typically fetched in an app or middleware logic that reacts to the order event.
- How do I attach terms or withdrawal as a PDF to a Shopify order confirmation?
- By having the middleware fetch the PDF artifact via the Public Delivery API on the order event and attach it to the transactional email. effective_at or version references the version that applied at the order moment.
- Does TermShelf provide a ready-made Shopify app?
- This guide does not claim that. What is described is an external delivery layer via the Public Delivery API; integration happens via your own app or middleware that fetches the artifact and embeds it in the transactional mail.
Related guides
Attaching terms as a PDF to order confirmations
How to attach the approved terms version as a PDF artifact from the Public Delivery API to transactional order confirmations — versioned and traceable.
Embedding the withdrawal notice in order confirmations
HTML in the email footer or PDF as attachment: how the approved withdrawal notice reaches transactional confirmations in a versioned way.
Which terms version applied at contract conclusion?
Version pinning, effective_at delivery and audit trail: how to establish the link between a transaction and the published version that applied at that time.