Skip to main content

Authentication

The Settlx API uses API key authentication. Every request to a protected endpoint must include your secret API key in the Authorization header as a Bearer token.
Authorization: Bearer pk_live_...
API keys begin with pk_live_.
Never expose your API key in client-side code, browser JavaScript, mobile apps, or public repositories. All authenticated API calls must be made server-side.

Getting your API key

  1. Log in to the Settlx Dashboard
  2. Go to Settings → API Keys
  3. Click Create API Key
  4. Copy the key immediately — it is shown only once and cannot be retrieved again
Store the key in an environment variable. Do not commit it to source control.
# .env
SETTLX_API_KEY=pk_live_...

Example requests

curl https://api.settlx.io/api/v1/invoices \
  -H "Authorization: Bearer $SETTLX_API_KEY" \
  -H "Content-Type: application/json"

Key management

ActionWhere
Create a new keyDashboard → Settings → API Keys
Revoke a keyDashboard → Settings → API Keys → Revoke
Rotate a keyCreate a new key, update your environment, then revoke the old key
Revoked keys are rejected immediately. There is no grace period.
If you suspect your API key has been compromised, revoke it immediately from the dashboard and generate a new one.

Public endpoints

The following endpoints do not require authentication and are safe to call from a browser or mobile client:
EndpointDescription
GET /api/v1/chainsList supported chains
GET /api/v1/tokensList supported tokens and chains
GET /api/v1/invoices/:id/statusPoll invoice payment status

Authentication errors

StatusCause
401 UnauthorizedMissing, malformed, or revoked API key
403 ForbiddenValid key but merchant account is inactive or suspended
429 Too Many RequestsRate limit exceeded — see API Conventions