Customer signatures
Generating a signature
Using a Liquid filter
{% if customer and customer.email %}
<script id="CustomerEmail">{{ customer.email }}</script>
<script id="CustomerSig">{{ customer.email | hmac_sha256: 'secret_key' }}</script>
{% endif %}const email = document.getElementById("CustomerEmail").innerHTML;
const signature = document.getElementById("CustomerSig").innerHTML;
// call this once on your page
window.dotapparel21.setCustomer({ email, signature });
// window.dotapparel21.customer is now available
const retailTransactions = await window.dotapparel21.customer.retailTransactions();Last updated