Environments
RewardOS provides two separate environments. Start on Staging, then move to Production after your integration is verified.
Staging & Production URLs
Section titled “Staging & Production URLs”| Environment | Base URL | Purpose |
|---|---|---|
| Staging | https://api.staging.rewardos.in |
Testing and development |
| Production | https://api.rewardos.in |
Live transactions with real money |
Getting Your Credentials
Section titled “Getting Your Credentials”Before you can use the API, you need two key pieces of information:
- clientId — Your unique partner identifier
- clientSecret — Your secret key (store securely; never expose in client-side code)
Contact contact@rewardos.in to obtain staging credentials. Production credentials are provided separately after your staging integration is verified.
Making Your First API Call
Section titled “Making Your First API Call”Once you have your credentials, test connectivity by calling the Login API:
curl -X POST "https://api.staging.rewardos.in/v1/partners/auth/login" \ -H "Content-Type: application/json" \ -d '{ "clientId": "YOUR_STAGING_CLIENT_ID", "clientSecret": "YOUR_STAGING_CLIENT_SECRET" }'Successful Response
Section titled “Successful Response”{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "expiresInSecs": 3600}IP Whitelisting
Section titled “IP Whitelisting”For security, RewardOS only allows requests from pre-approved IP addresses:
- Staging: IP whitelisting may not be required (confirm with RewardOS)
- Production: Your server IPs must be whitelisted before going live
To whitelist IPs, contact RewardOS with your company details and the server IP addresses you will use.
Environment Configuration Best Practices
Section titled “Environment Configuration Best Practices”- Configure base URLs separately — switching from staging to production should be a config change.
- Use environment variables — store credentials outside source code.
- Never commit credentials — use secrets management in production.
const config = { baseUrl: process.env.NODE_ENV === 'production' ? 'https://api.rewardos.in' : 'https://api.staging.rewardos.in', clientId: process.env.REWARDOS_CLIENT_ID, clientSecret: process.env.REWARDOS_CLIENT_SECRET,};Next Steps
Section titled “Next Steps”- Set up authentication and token management
- Explore the brand catalog
- Place test orders