Skip to main content

API Keys

Every request to the Settlx API must include your API key in the Authorization header.
Authorization: Bearer pgk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
API keys are sensitive credentials. Never expose them in frontend code, mobile apps, or public repositories. All requests must originate from your backend server.

Getting Your API Key

  1. Log in to your Settlx dashboard
  2. Go to Settings → API Keys
  3. Click Create New Key
  4. Copy the key immediately — it is only shown once

Key Format

All production API keys begin with the prefix pgk_live_.
pgk_live_a1b2c3d4e5f6...

Example Request

curl -X POST https://api.settlx.io/api/v1/invoices \
  -H "Authorization: Bearer pgk_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"amount": "100.00", "currency": "USDT"}'

Authentication Errors

StatusMessageReason
401Missing or invalid Authorization headerHeader not provided or not in Bearer <key> format
401Invalid API keyKey not found or has been revoked
401API key has expiredKey passed its expiry date
403Merchant account is not activeAccount is suspended or pending review

Rate Limits

Requests are rate limited based on your account tier.
TierRead requestsWrite requests
Free60 / minute30 / minute
Pro300 / minute150 / minute
Every response includes rate limit headers:
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 28
X-RateLimit-Reset: 1744329600
When you exceed the limit, the API returns 429 Too Many Requests with a retryAfter value in seconds.

Best Practices

  • Store your API key in an environment variable, never hardcoded
  • Rotate your key periodically from the dashboard
  • Revoke any key you suspect has been compromised immediately