Skip to content

Environments

RewardOS provides two separate environments. Start on Staging, then move to Production after your integration is verified.

Environment Base URL Purpose
Staging https://api.staging.rewardos.in Testing and development
Production https://api.rewardos.in Live transactions with real money

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.

Once you have your credentials, test connectivity by calling the Login API:

Terminal window
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"
}'
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresInSecs": 3600
}

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.

  • 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,
};
  1. Set up authentication and token management
  2. Explore the brand catalog
  3. Place test orders