Welcome to Yotpo's Loyalty and Referrals Developer Hub

Welcome to the Loyalty and Referrals developer hub. You'll find comprehensive guides and documentation to help you start working with Loyalty and Referrals as quickly as possible!

API Reference    Guides

Adding Point Balance, Referral Links, and Rewards Popup

The elements below can be added to your site to help improve the customer experience when engaging with your loyalty and referral programs.

Embed Point Balance

You can embed a customer's point balance anywhere on your site. All you need to do is add an element with the class name swell-point-balance to your page. We'll automatically update it upon page load with the correct balance amount.

<span class="swell-point-balance">0</span>

Embed Referral Link

You can embed a customer's referral link anywhere on your site. All you need to do is add an element with the class name swell-embedded-referral-link to your page. We will automatically update it upon page load with the correct referral link.

<span class="swell-embedded-referral-link"></span>

Embed Rewards Popup

You can add a link to open the Rewards Popup anywhere on your site. All you need to do is add an element that calls the JavaScript function swellAPI.showRewardsPopup() to your page.

<a href="javascript:swellAPI.showRewardsPopup()">Open Rewards Program</a>

Updated 2 years ago

Adding Point Balance, Referral Links, and Rewards Popup


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.