Authentication
NowRamp uses API keys for authentication. This guide covers how to obtain, use, and manage your API keys.Getting Your API Key
Via Partner Dashboard
- Log in to your Partner Dashboard
- Navigate to Settings > API Keys
- Click Create New Key
- Copy and securely store the key
API keys are only shown once when created. Make sure to copy and store them securely before closing the dialog.
Using Your API Key
Include your API key in theX-API-Key header with every request:
JavaScript Example
Python Example
Key Types
| Type | Prefix | Usage |
|---|---|---|
| Live | ramp_live_ | Production API calls |
| Test | ramp_test_ | Sandbox/testing |
Scoped Permissions
API keys can be scoped to specific permissions:quotes:read/writeorders:read/writecustomers:read/writewallets:read/writekyc:read/writewebhooks:read/write
Security Best Practices
1. Environment Variables
Store keys in environment variables, never in code:2. Server-Side Only
API keys should only be used server-side. For client-side integrations, use the widget which handles authentication automatically.3. Key Rotation
Rotate your API keys regularly. You can rotate keys in the Partner Dashboard:- Go to Settings > API Keys
- Click the Rotate button next to the key you want to rotate
- Confirm the rotation and copy the new key
- Update your application with the new key before the grace period expires
When you rotate a key, the old key remains valid for a 24-hour grace period to allow for seamless transitions.
4. IP Allowlisting
Contact support to enable IP allowlisting for additional security.5. Audit Logs
Monitor API key usage in the dashboard under Settings > Audit Logs.Handling Authentication Errors
| Error Code | Description | Solution |
|---|---|---|
MISSING_API_KEY | No key in header | Add X-API-Key header |
INVALID_API_KEY | Key is invalid | Check key value |
API_KEY_EXPIRED | Key has expired | Create a new key |
INSUFFICIENT_PERMISSIONS | Missing scope | Add required permission |
Widget Authentication
The embeddable widget uses a different authentication flow:- Widget is initialized with your API key and project ID
- Widget creates a secure session for the customer
- All subsequent calls use the session token