INTEGRATION GUIDE
Integrate rewards
in under an hour.
Step-by-step guide from API key to your first live reward. Works with any language or framework.
STEP 01
Get your API key
Sign up and navigate to Settings → API Keys in your dashboard. Generate a key for the sandbox environment to start.
// Your API key const RIBI_API_KEY = 'sk_live_your_key_here';
STEP 02
Make your first API call
Install the SDK or use plain HTTP. Send a reward to a test recipient to verify your setup.
const response = await fetch(
'https://api.ribirewards.com/v1/rewards',
{
method: 'POST',
headers: {
'Authorization': `Bearer ${RIBI_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
recipient: 'amaka@company.ng',
type: 'choice_card',
amount: 10000,
currency: 'NGN'
})
}
);STEP 03
Configure webhooks
Add your endpoint URL in the dashboard and subscribe to events. Every reward lifecycle event will POST to your URL.
// Your webhook handler
app.post('/ribi-webhook', (req, res) => {
const { event, data } = req.body;
if (event === 'reward.redeemed') {
await db.rewards.update(data.reward_id, {
status: 'redeemed',
redeemedAt: data.redeemed_at
});
}
res.status(200).send('OK');
});STEP 04
Go live
Switch from sandbox to production keys. Update your base URL. You're done — rewards are now flowing for real.
// Switch to production
const ribi = new RibiRewards({
apiKey: process.env.RIBI_LIVE_KEY,
// baseUrl defaults to production
});Stuck on integration?
Our developer support team responds within 4 hours on business days.
Contact Developer Support →