Shopify integration - Rate-API

Shopify

No key needed

Add a currency converter to any Shopify storefront with a small Liquid snippet - no app to install and no API key. It defaults the “to” currency to your store currency.

Download snippet (.liquid) API reference

Setup

  1. 1

Add the snippet

In your admin go to Online Store → Themes → ⋯ → Edit code. Under Snippets click “Add a new snippet”, name it rate-api-converter, and paste this.

{% comment %} Rate-API converter - no API key needed {% endcomment %}
<div data-rate-api-widget data-from="USD" data-to="{{ shop.currency }}" data-amount="100" data-theme="light"></div>
<script src="https://rate-api.com/widget.js" async></script>
  1. 2

Render it on a page

In a template or section (e.g. templates/page.liquid), drop it in where you want the converter to appear.

{% render 'rate-api-converter' %}
  1. 3

Customise (optional)

Override any default when you render it.

{% render 'rate-api-converter', from: 'USD', to: 'EUR', amount: 100, theme: 'dark' %}