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 });