useLoyalty Documentation
Build powerful loyalty and gamification experiences
Welcome to the useLoyalty documentation! useLoyalty is a complete loyalty and gamification platform that helps you engage customers through points, rewards, quests, and community features.
Quick Start
Get started with useLoyalty in minutes:
- Create a Project - Set up your loyalty program in the dashboard
- Get API Keys - Grab your public and private keys
- Integrate - Use the SDK, Widget, or platform integrations
Core Concepts
| Concept | Description |
|---|---|
| Members | Your users enrolled in the loyalty program |
| Points | Currency earned and spent on rewards |
| Rewards | Items members can redeem with points |
| Quests | Challenges that award points on completion |
| Badges | Achievements recognizing milestones |
| Referrals | Viral growth through member invites |
Documentation Sections
Server SDK
REST API for server-side integration. Manage members, award points, complete quests, and more.
Widget
Embeddable loyalty widget for your website. Customizable, multi-language, and feature-rich.
Integrations
Connect with Shopify, WooCommerce, and Discord for automatic point earning.
Integration Options
Server SDK
Use the REST API for full control over your gamification logic:
// Award points when user completes an action
await fetch("https://app.useloyalty.app/api/v1/members/user_123/points", {
method: "POST",
headers: {
Authorization: "Bearer sk_your_private_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
amount: 100,
description: "Completed profile setup",
}),
});Widget
Embed a beautiful loyalty experience with minimal code:
<script src="https://cdn.useloyalty.app/widget/useloyalty-widget.iife.js"></script>
<script>
UseLoyaltyWidget.init({
publicKey: "pk_your_key",
externalId: "user_123",
timestamp: Date.now(),
signature: "hmac_signature",
});
</script>Platform Integrations
Connect your store or community for automatic points:
- Shopify - Points for orders, discount code rewards
- WooCommerce - WordPress plugin with My Account integration
- Discord - Reward messages, voice, and events
Features Overview
Points & Rewards
- Flexible point earning rules
- Multiple reward types (coupons, physical, digital, raffles)
- Points multiplier events (2x, 3x during promotions)
- Refund handling with automatic point deduction
Gamification
- Quests with manual, automated, or self-report completion
- Multi-step quests with progress tracking
- Daily check-ins with streak bonuses
- Games (spin wheel, slots, dice, scratch cards)
- Achievement badges with rarity levels
Growth
- Referral program with configurable rewards
- Social sharing with point incentives
- Account linking (Discord)
- Promo code system
Customization
- Full widget theming (colors, fonts, positioning)
- 11 languages supported
- Feature toggles (hide quests, referrals, etc.)
- White-label ready
API Overview
| Endpoint | Purpose |
|---|---|
POST /api/v1/members | Create or update members |
POST /api/v1/members/:id/points | Award or deduct points |
POST /api/v1/events | Track events for automated quests |
POST /api/v1/quests/:id/complete | Complete manual quests |
POST /api/v1/referrals/apply | Apply referral codes |
POST /api/v1/members/:id/badges | Award badges |
Security
- API Authentication: Private keys with HMAC signatures
- Widget Authentication: Signed payloads prevent tampering
- Webhook Verification: HMAC-SHA256 for all integrations
- Data Encryption: Sensitive tokens encrypted at rest
Support
Need help? Here are your options:
- Documentation: You're here! Browse the guides.
- API Reference: Detailed endpoint documentation in each section
- Dashboard: Access your project settings and analytics