Overview
LoyalPro provides a comprehensive REST API that enables you to build powerful loyalty programs for your business. This guide will walk you through the essential steps to integrate LoyalPro into your application.
Create Your Account
Sign up for a free LoyalPro account to get your API credentials.
Get API Keys
Generate your API keys from the developer dashboard.
Install SDK
Install our SDK for your preferred programming language.
Make Your First Call
Start integrating LoyalPro into your application.
Prerequisites
Before you begin, make sure you have:
- A LoyalPro account (sign up for free at loyalpro.com)
- Basic knowledge of REST APIs
- A development environment with Node.js, Python, or PHP
- An HTTP client like cURL, Postman, or Insomnia
Authentication
LoyalPro uses API keys to authenticate requests. You can manage your API keys from your dashboard. Your API keys carry many privileges, so be sure to keep them secure.
Keep your API keys secure
Never share your API keys in publicly accessible areas such as GitHub, client-side code, or in URLs.
Authorization: Bearer YOUR_API_KEY
X-LoyalPro-Version: 2025-01-01Test Mode
Use test API keys (starting with sk_test_) for development.
Live Mode
Use live API keys (starting with sk_live_) for production.
Installation
Install the LoyalPro SDK for your preferred programming language:
npm install @loyalpro/node-sdkpip install loyalprocomposer require loyalpro/loyalpro-phpMake Your First API Request
Let's create your first customer in LoyalPro. Here's a simple example:
const LoyalPro = require('@loyalpro/node-sdk');
const loyalpro = new LoyalPro('sk_test_your_api_key');
// Create a new customer
const customer = await loyalpro.customers.create({
email: 'customer@example.com',
name: 'John Doe',
phone: '+234 801 234 5678'
});
console.log(customer);Response
{
"id": "cus_abc123xyz",
"email": "customer@example.com",
"name": "John Doe",
"phone": "+234 801 234 5678",
"points_balance": 0,
"tier": "Bronze",
"created_at": "2025-01-15T10:30:00Z"
}Next Steps
Was this page helpful?
Help us improve our documentation