Install the banner
The script is the same everywhere. What changes is where the coupon is redeemed.
<script
src="https://YOUR_FAIRPRICE_HOST/embed.js"
data-site="YOUR_PUBLIC_KEY"
async
></script>Replace the host with the origin of this FairPrice server, and the site key with the one on your Install page. The demo key demo is public and accepts a data-country attribute so you can preview it. A paid store ignores that attribute in production and uses the edge geolocation headers instead.
- Plain website — paste the script before
</body>. - Gumroad — codes live in Gumroad; the script lives on your site.
- Lemon Squeezy — discount codes and a checkout URL.
- Stripe Checkout — promotion codes and Payment Links.
Create the four codes first
Default suggestions are FAIR50, FAIR40, FAIR25, and FAIR15. Change them to whatever your checkout already accepts. A tier with a blank code or a 0% discount stays silent. The code is static. FairPrice withholds it from full-price countries, excluded countries, and VPN, proxy, Tor, and datacenter traffic. Cap redemptions in your checkout so a shared code cannot run forever.
Edge, not the browser’s guess
Country comes from the host in front of FairPrice: x-vercel-ip-country on Vercel, cf-ipcountry on Cloudflare, or CloudFront’s viewer country header. A VPS with no geo header and no IP-intel provider cannot place a visitor, so the banner stays hidden. That is intentional.