List all active, storefront-visible earning rules for the shop.
Retrieve the active earning rules a customer can see, with points already boosted for the logged-in customer’s VIP tier and any active bonus campaign. Use this to display how customers earn points. Pass the logged-in customer through the app proxy and the response reflects their personalized earning rates; for guests it returns base rates.
MageSDK.getEarningRules().then(function(resp) { if (resp.success) { resp.data.earningRules.forEach(function(rule) { // `points` is the final award after tier and campaign boosts console.log(rule.name, rule.points); }); }});