Navigation

Authentication

BillerAPI uses two authentication mechanisms depending on the type of operation.

Authentication Methods

Choose the right method for your use case

Client Credentials

Server-to-server API calls using your client ID and secret.

X-Client-ID + X-Client-Secret

Access Tokens (Bearer)

Per-account tokens from the link token exchange, used for bill retrieval.

Authorization: Bearer <token>

Client Credentials

Use client credentials for all server-to-server API calls: biller search, link token creation, webhook registration, and more. Include both headers with every request.

X-Client-ID: your_client_id
X-Client-Secret: your_client_secret

Getting Your Credentials

  1. Sign up at the Client Portal to create a developer account
  2. Navigate to Dashboard → API Keys
  3. Generate a client secret for your target environment

Key Formats

EnvironmentKey PrefixBase URL
Sandboxbb_test_*https://sandbox.api.billerapi.com
Productionbb_live_*https://api.billerapi.com
Example: List billers with client credentials
const response = await fetch('https://sandbox.api.billerapi.com/billers', {
  headers: {
    'X-Client-ID': process.env.BILLERAPI_CLIENT_ID,
    'X-Client-Secret': process.env.BILLERAPI_CLIENT_SECRET,
  },
});
const data = await response.json();

Keep secrets safe

Never expose your client secret in client-side code (browser, mobile app). All API calls using client credentials must originate from your server.

Access Tokens (Bearer)

Access tokens are scoped to a single linked account. You obtain them by exchanging the public token returned by the Connect SDK after a user completes the linking flow.

How to Get an Access Token

1

Create a link token

POST /link/token/create with client credentials

2

User completes Connect flow

The Connect SDK opens an iframe where the user links their biller account

3

Exchange the public token

POST /link/token/exchange returns an access_token

4

Use the access token

Pass as Authorization: Bearer <access_token> for bill retrieval endpoints

Example: Fetch bills with an access token
const response = await fetch(
  'https://sandbox.api.billerapi.com/bills/get?account_link_id=link_123',
  {
    headers: {
      'Authorization': `Bearer ${accessToken}`,
    },
  }
);
const bills = await response.json();

Environments

Use the sandbox environment for development and testing. Switch to production when you're ready to go live.

EnvironmentBase URLDescription
Sandboxhttps://sandbox.api.billerapi.comTest billers, deterministic data, no real accounts
Productionhttps://api.billerapi.comLive billers, real account data

Note

Sandbox uses test billers with magic account numbers that produce deterministic responses. See the Getting Started guide for sandbox test data.

Error Handling

All errors return a consistent JSON response format.

Error Response
{
  "statusCode": 401,
  "message": "Invalid client credentials",
  "error": "Unauthorized"
}

Common Error Codes

StatusMeaningAction
401Invalid or missing credentialsCheck client ID/secret or refresh token
403Insufficient permissionsVerify your account has the required scopes
429Rate limit exceededBack off and retry after the Retry-After period
500Internal server errorRetry with exponential backoff; contact support if persistent

Rate Limits

Endpoint GroupLimit
Authentication5 requests / minute per IP
Link Operations100 requests / minute per client
Biller Operations200 requests / minute per client

Security Best Practices

  • Store credentials in environment variables, never in source code
  • Rotate client secrets periodically via the dashboard
  • Use separate credentials for sandbox and production
  • Verify webhook signatures before processing events
  • Never expose client secrets in frontend code or public repositories
  • Never log full credentials — redact secrets in logs

Related API Reference