Cashline

Docs

Shopify

Cashline does not have a Shopify app. You paste the snippet in the theme and fire purchase only when Shopify has an order. There is no silent backfill of old orders.

theme.liquid

Online Store → Themes → Edit code → layout/theme.liquid, just before </body>.

<script>
  window.cashline = window.cashline || function () {
    (window.cashline.q = window.cashline.q || []).push(arguments);
  };
</script>
<script src="https://YOUR_ORIGIN/cashline.js" data-site="cl_your_site_id"></script>
<script>cashline('pageview');</script>

Thank-you page purchase

Use a additional script on the checkout thank-you page (Shopify Plus or the order status page). Amount should be the order total in rand if you sell in ZAR. Skip the call when the order is not paid.

cashline('purchase', {
  amount: {{ order.total_price | money_without_currency }},
  currency: 'ZAR',
  reference: '{{ order.order_number }}'
});