pasbydocs
Getting started

Credentials & environments

API keys, app secrets, sandbox vs production, and required headers for v2.

Environments

EnvironmentBase URLAPI key prefixBilling pre-check
Sandboxhttps://s.pasby.africabk-test_Skipped
Productionhttps://l.pasby.africabk-live_Enforced

Obtain keys and secrets from the pasby console. Step-by-step setup with Console screenshots: How to get API keys. Pair test keys with test secrets and live keys with live secrets—mixing environments returns credential errors.

Typical secret prefixes: snb_ (sandbox), prd_ (production). Confirm exact formats in Console when you create an app.

Console overview

Console is where you manage organisations, apps, API keys, client secrets, communication keys, scopes, and usage. Typical workflows:

AreaWhat you do
OrganisationsBilling boundary; one org can host multiple apps
AppsPer-product integration; each has its own client secret and PEM keys
API configurationGenerate organisation API keys (bk-test_ / bk-live_)
App settingsClient ID, secrets, communication / service account files

Organisations and apps

An organisation (consumer) groups apps that share billing. When you register, your first organisation is usually created for you. You can add more from the dashboard.

An app belongs to exactly one organisation. It uses the organisation’s API key but has its own app secret and RSA communication keys for decrypting claims. Each app is either Sandbox or Production — not both at once.

Credential prefixes

PrefixMeaning
bcn_Consumer (organisation) id
app_Application id
bk-test_ / bk-live_API key (sandbox / production)
snb_ / prd_App secret (typical; confirm in Console)

Setup checklist

Follow the full walkthrough in How to get API keys, then continue with Your first call.

Production access requires a billing plan; see pasby pricing.

Credential headers

HeaderRole
x-api-keyYour organisation API key — required on nearly all endpoints
x-access-secretYour app secret — primary credential for v2
x-access-tokenSession token — v1 legacy only
x-api-key: bk-test_your_api_key
x-access-secret: your_app_secret
Content-Type: application/json

Routes that require the secret return HTTP 400 with plain text App secret missing in headers. if it is absent.

v1 (legacy)

  1. Call GET /api/v1/flow/authorize with secret, API key, and query params.
  2. Store the x-access-token response header.
  3. Pass x-access-token on subsequent calls.

Migrate to v2 to remove the authorize + token lifecycle. See Migration v1 → v2.

Communication keys

Backend apps need RSA key pairs to decrypt claims returned from flow ping after identification.

  1. Open your app in the pasby console.
  2. Download the communication / service PEM files for your environment.
  3. Store the private key on your server only.

Walkthrough: Handling encrypted claims. Reference decrypt helper: SampleCode pasby.ts.

Security rules

  • Never commit secrets to git or expose them in client-side code.
  • Rotate secrets via Console when team members leave or keys leak.
  • Log request IDs, not secrets or full access tokens.
  • Treat every call with a valid API key as metered (including health checks).

Global platform behavior

BehaviorDetail
CORSEnabled on API routes
Rate limit100 requests / minute / IP — HTTP 429 if exceeded
Usage meteringRequests with x-api-key and status below 500 are recorded
Billing gateIdentification routes check authentication billing; signing and document routes check signature billing (skipped for test keys)

On this page