Environments
Understand the difference between Test and Production modes for API development.
Test vs Production
The Raba7ni Developer API supports two environments to help you safely develop and deploy integrations:
| Feature | Test Mode | Production Mode |
|---|---|---|
| API Key Prefix | test_ |
prod_ |
| Transactions | Real (creates actual records) | Real |
| Notifications | Skipped (logged only) | Sent to members |
| Webhooks | Include test: true flag |
Normal delivery |
| Rate Limits | Sandbox tier limits | Paid tier limits |
API Base URLs by Product
Each API product has its own route prefix:
| Product | Base URL |
|---|---|
| ⭐ Points (Loyalty) | https://app.raba7ni.com/api/v1/loyalty/ |
| 🎟️ Stamps | https://app.raba7ni.com/api/v1/stamps/ |
| 💰 Cashback | https://app.raba7ni.com/api/v1/cashback/ |
API Key Prefixes
You can identify the environment by the API key prefix:
X-Api-Key: test_sk_abc123def456...
X-Api-Key: prod_sk_xyz789ghi012...
Response Metadata
All API responses include a meta object that tells you which mode was used:
{
"success": true,
"data": { ... },
"meta": {
"mode": "test",
"request_id": "req_abc123"
}
}
When to Use Each Mode
Development Phase
Use Test Mode while building your integration. This prevents accidental notifications to real members.
Staging/QA
Continue using Test Mode for quality assurance. Check the meta.mode in responses to verify.
Production Launch
Switch to Production Mode keys when ready to go live with real member interactions.
Sandbox Tier Limitation
Partners on the free Sandbox tier can only create Test Mode API keys. Upgrade to a paid tier to access Production Mode.
Creating Keys for Each Environment
[Screenshot: API Key creation modal showing environment selector (Test/Production)]
When creating a new API key in your dashboard:
- Navigate to Developer → API Keys
- Click "Create API Key"
- Select the Environment (Test or Production)
- Choose the required scopes
- Click Create