From zero to integrated in under an hour.
Log into your Business Dashboard, navigate to the API Access tab, and submit a request describing your integration use case. Our team reviews all requests.
Once approved, you'll receive a secret API key (mm_live_...) visible in your dashboard. Keep this key secure — it grants access to your loyalty data.
Add the Mmama Perks widget script to your website's <head> tag, then place the widget container wherever you want the loyalty card to appear.
Customers can now join your loyalty programs, collect stamps/points, and redeem rewards directly from your website. Award points via the API on every purchase.
Choose your integration method below.
Loyalty Card Widget
Shows the customer's stamp card, points balance, and reward progress. Auto-syncs in real-time. Works on Shopify, WooCommerce, WordPress, Wix, and any custom website.
<!-- 1. Add to your <head> -->
<script src="https://api.mmamaperks.app/widgets/embed.js"
data-api-key="mm_live_YOUR_API_KEY"
data-business-id="YOUR_BUSINESS_ID"
defer>
</script>
<!-- 2. Place wherever you want the card to appear -->
<div id="mmama-loyalty-card"
data-program-id="YOUR_PROGRAM_ID"
data-theme="light"
data-customer-email="customer@example.com">
</div>// Or initialise programmatically (recommended for SPAs)
<script>
window.MmamaPerks.init({
apiKey: "mm_live_YOUR_API_KEY",
businessId: "YOUR_BUSINESS_ID",
});
// Mount the loyalty card widget
MmamaPerks.mountCard({
container: "#loyalty-card",
programId: "YOUR_PROGRAM_ID",
customerEmail: "customer@example.com",
theme: "light",
onRewardReady: function(card) {
console.log("Customer earned a reward!", card);
},
onStamp: function(newTotal, goal) {
console.log("Stamp earned: " + newTotal + "/" + goal);
}
});
</script>Never expose your API key in client-side code
If you must embed the widget script client-side, use the read-only widget embed — not the full API key. Full API key calls should go through your backend server.
Rotate keys if compromised
If your key leaks, revoke it immediately from your Business Dashboard → API Access tab and request a new one.
Use the correct scopes
Request only the permissions you need (e.g. just 'earn' if you're only awarding points). Minimising scopes reduces risk.
Rate limits apply
Default rate limit is 100 requests/hour per key. Contact us for higher limits on enterprise plans.
Set up your business profile, create a loyalty program, and request API access.