import loyalty from 'mage'REST API, JavaScript SDK, Metafields, and Webhooks. Everything you need to ship custom loyalty on any Shopify stack, including headless. Then let our infrastructure handle the scale.
Uptime SLA
API calls / day

The shopify loyalty developer toolkit with REST API, JS SDK, webhooks, and Shopify Flow
Full CRUD on loyalty data. Customers, points, tiers, rewards, referrals. Build exactly what your brand needs.
Client-side loyalty data, loaded where you need it. Points, rewards, tier status — rendered your way, on any storefront.
Loyalty data synced natively into Shopify. Build custom Liquid templates without API calls. No workarounds.
Real-time events — points earned, rewards redeemed, tiers upgraded. Send them into Shopify Flow or your own backend.
SDK for speed. API for control. Pick your level of abstraction. Then ship loyalty experiences that no template could produce.
MageSDK.getCustomerDetails().then(function(resp) {
if (!resp.success) return;
const customer = resp.data.customer;
renderWidget({
points: customer.points, // 450
lifetime: customer.lifetimePoints, // 1200
redeemed: customer.redeemedPoints, // 750
tier: customer.tier.name, // "Gold"
referral: customer.referralUrl
});
});Bespoke loyalty on any Shopify stack. No limitations.
Build on-brand loyalty portals and account pages with our components and APIs. Total control over the experience.
Spin up leaderboards and points challenges that turn loyal customers into competitive regulars racing to the top.
Turn customers into content creators. A dedicated feed where shoppers upload photos with your products, earn points, and get seen by the whole community.
Docs, SDKs, and a direct line to engineering. Ship fast.
Full REST API docs. Endpoints, parameters, response schemas. Everything you need to build.
View docsClient-side SDK for custom frontend loyalty experiences. Framework-agnostic.
SDK referenceDirect channel with the team that builds Mage. Questions answered by people who ship the code.
From zero to custom loyalty in under an hour. The fastest path to production.
Get startedREST API for full CRUD on loyalty data. JavaScript SDK for frontend rendering. Shopify Metafields for native Liquid access. Webhooks for real-time event streaming. Pick the layer that fits your architecture.
API keys from your Mage dashboard under Settings > API Keys (Growth plan and above). Include in the Authorization header — no Bearer prefix. Scoped as full access or read-only. All traffic encrypted over HTTPS.
Yes. REST API from any server — Hydrogen, Next.js, Remix, your own backend. JavaScript SDK client-side on any storefront. Framework-agnostic. If it can make an HTTP request, it works with Mage.
Signed POST requests for points.earned, points.redeemed, tier upgrades, and more. X-Webhook-Signature and X-Webhook-Timestamp headers for verification. Failed deliveries retried 3 times with exponential backoff. Configure under Settings > Webhooks.
Infrastructure handles 1M+ calls daily. Limits are generous and scale with your plan. Need more for a specific integration? Talk to us. We accommodate custom requirements.
Shared Slack channel with the engineers who build Mage. Code reviews for complex integrations. Real-time debugging. Not a help desk — a direct line to the team.
Loyalty data — points, tier, rewards — synced into Shopify Metafields automatically. Access it directly in Liquid templates. No API calls needed. Perfect for theme customisations and server-rendered pages.