Storefront App Proxy Architecture
Rather than forcing customers to email customer support for PDF invoices, SuperGST provides a secure storefront App Proxy endpoint:
https://yourstore.com/apps/invoices?order_id={{ order.id }}
When a customer requests their invoice:
- 1Shopify validates the customer's request using cryptographic HMAC signatures.
- 2The App Proxy checks whether the invoice has finished generating. If processing is underway, an animated status page informs the buyer that the invoice is being prepared and auto-refreshes.
- 3Once generated, SuperGST issues an authorized, time-limited secure download link for the customer's browser to retrieve the official PDF invoice.
- 4The customer's browser immediately downloads the official print-ready PDF invoice.
Native Email Automation & Metafield Trigger
SuperGST integrates directly with Shopify's native notification system. When an invoice PDF is compiled and saved, SuperGST sets the following order metafield:
namespace: "custom", key: "gst_invoice_generated", value: true
You can use this trigger inside your Shopify Order Confirmation or Shipping Confirmation Liquid email templates:
```liquid
{% if order.metafields.custom.gst_invoice_generated %}
<a href="https://{{ shop.domain }}/apps/invoices?order_id={{ order.id }}" class="button">
Download Official GST Invoice
</a>
{% endif %}
`
Because download links are served dynamically through the App Proxy, merchants never have to worry about broken or expired static file URLs in emails.