For Pagolight you do not need any Public API Key but you can add it if you have one so we can better monitor your integration.
<!-- DEFINE CUSTOM TERMS HERE -->
{% assign minimum_amount = 10000 %}
{% assign maximum_amount = 500000 %}
{% assign available_terms = '3,6,12,24,36' | split:"," %}
{% assign min_instalment_amount = 2000 %}
<!-- DON'T CHANGE ANYTHING BELOW THIS LINE -->
%- if product.price >= minimum_amount and product.price \<= maximum_amount -%}
{% assign term_ceiling = product.price | divided_by: min_instalment_amount %}
{% assign acceptable_terms = '' %}
{% for term in available_terms %}
{% assign test_term = term | times: 1 %}
{% if test_term \<= term_ceiling %}
{% assign acceptable_terms = acceptable_terms | append: "," %}
{% assign acceptable_terms = acceptable_terms | append: term %}
{% endif %}
{% endfor %}
<div class="heidi_messaging">
<div
id="heidipay-container"
data-heidipay="true"
data-heidipay-minorAmount="{{ product.price }}"
data-heidipay-allowedterms="{{ acceptable_terms | split: "," | last }}"
data-heidipay-currencySymbol="EUR"
data-heidipay-lang="{{ localization.language.iso_code | slice: 0, 2 }}"
data-heidipay-type="PRODUCT_DESCRIPTION_PAGOLIGHT"
data-heidipay-apiKey="e9692836-8ff7-41cc-9c8c-e0d729e3a683"
data-heidipay-cadence="MONTHLY"
data-heidipay-thousandsSeparator="."
data-heidipay-decimalSeparator=","
data-heidipay-symbolOnLeft="false"
data-heidipay-spaceBetweenAmountAndSymbol="true"
data-heidipay-decimalDigits="2" >
</div>
</div>
{%- endif -%}
You will also need to include the script below. We recommend it be included somewhere it will always load (typically the index or a footer).
<!-- FOR DEMO / SANDBOX VERSION -->
<script src="https://sbx-upstream.heidipay.io/sdk/heidi-upstream-lib.js" ></script>
<!-- FOR PRODUCTION / LIVE VERSION -->
<script src="https://upstream.heidipay.com/sdk/heidi-upstream-lib.js" ></script>
This script will load the promotional message.