Skip to main content

Authentication

The NowRamp Onramp API is designed for simplicity — most endpoints are public and don’t require an API key.

Onramp API (Public)

All Onramp API endpoints (/public/v1/onramp/*) are public. Pass your projectId as a query parameter or in the request body:
// No API key needed
const quotes = await fetch(
  'https://api.nowramp.com/public/v1/onramp/quotes?projectId=your_project_id&fiatCurrency=USD&cryptoCurrency=ETH&network=ethereum&fiatAmount=100'
).then(r => r.json());

Optional: Public Key for Higher Rate Limits

By default, public endpoints are rate-limited to 60 requests per minute. To increase this to 1000 requests per minute, include a public key (pk_) in the X-API-Key header:
curl "https://api.nowramp.com/public/v1/onramp/quotes?projectId=YOUR_PROJECT_ID&fiatCurrency=USD&cryptoCurrency=ETH&network=ethereum&fiatAmount=100" \
  -H "X-API-Key: pk_live_your_public_key"
Public keys (pk_) are safe to use in frontend code.

API Key Types

Key PrefixTypeUsage
pk_live_Public Key (Live)Frontend — optional, for higher rate limits
pk_test_Public Key (Test)Frontend — sandbox environment
sk_live_Secret Key (Live)Backend only — partner dashboard operations
sk_test_Secret Key (Test)Backend only — sandbox
Secret keys (sk_) must never be exposed in client-side code. They are only needed for partner dashboard operations (webhook management, API key rotation, etc.), not for the Onramp API.

Getting Your Keys

  1. Log in to your Partner Dashboard
  2. Navigate to Settings > API Keys
  3. Copy your project ID and public key
See the Partner Dashboard guide for more details.

Environments

EnvironmentKey PrefixAPI URL
Productionpk_live_ / sk_live_https://api.nowramp.com
Sandboxpk_test_ / sk_test_https://api.sandbox.nowramp.com

Security Best Practices

Store Keys in Environment Variables

# .env (never commit this file)
NEXT_PUBLIC_NOWRAMP_PROJECT_ID=your_project_id
NEXT_PUBLIC_NOWRAMP_PUBLIC_KEY=pk_live_abc123xyz789
const api = new RampApi({
  projectId: process.env.NEXT_PUBLIC_NOWRAMP_PROJECT_ID,
  apiKey: process.env.NEXT_PUBLIC_NOWRAMP_PUBLIC_KEY  // Optional
});

Key Rotation

Rotate your API keys periodically via the Partner Dashboard:
  1. Go to Settings > API Keys
  2. Click Roll next to the key
  3. Update your application configuration
  4. The old key remains valid for 24 hours (grace period)

Error Codes

Error CodeHTTP StatusDescription
INVALID_API_KEY401API key is invalid or revoked
RATE_LIMIT_EXCEEDED429Too many requests — add a pk_ key or implement backoff

Next Steps