Loyalty & Rewards: Javascript API

  • Updated

The Launcher JavaScript API exposes the following methods to the global object: StampedFn. You can use them to control your loyalty launcher programmatically.

Call this method to open/close the Launcher. Additional configuration methods must be called in a separate string or object:

StampedFn.toggleRewardsModal();

To load the "Referrals" card view:

StampedFn.loadLauncherView('view-referrals-email');

To load the "Sendings" card view:

StampedFn.loadLauncherView('view-spendings');

To load the "Earnings" card view:

StampedFn.loadLauncherView('view-earnings');

To load the "Your Rewards" card view:

StampedFn.loadLauncherView('view-your-rewards');

To copy the redeemed coupon code:

StampedFn.setOptions({ is_rewards_code_copy: true });

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request