TeePayDocs
Getting started

Authentication

Secret API keys, scopes, rotation and how TeePay authorises every request.

TeePay authenticates your server with a secret API key sent as a bearer token.

curl https://api.teepay.me/v1/whoami \
  -H "Authorization: Bearer tp_live_xxxxxxxx.xxxxxxxxxxxxxxxx"
Header
Exactly one Authorization: Bearer header
Live keys
tp_live_<prefix>.<secret>
Test keys
tp_test_<prefix>.<secret>
Not accepted
Query-string keys, X-API-Key, keys in the body

Create and manage keys

Keys are created in Developers → API keys in the dashboard. Creating, rotating or revoking a key asks you to confirm the action. The secret is displayed once; TeePay stores only a verifier.

  • Expiry: optional, up to 366 days.
  • Rotation: issues a new secret and keeps the old one working for an overlap you choose (1 second to 1 hour), so you can deploy without downtime.
  • Revocation: takes effect immediately. Revoke at once if a key may have leaked.

Scopes

Each key carries the scopes you select. A scope only works while your account also has the matching permission, so removing a permission from your account disables the scope immediately.

ScopeAllows
collection:readRead collections and their status
collection:createSend mobile money push payments
checkout:readRead checkout sessions
checkout:createCreate checkout sessions
control_number:readRead Control Numbers and their verified payments
control_number:createIssue Control Numbers (requires approved Control Number access)
disbursement:readRead payouts
disbursement:createQuote and send payouts (requires payout approval)

GET /v1/whoami and GET /v1/capabilities work with any valid key.

How each request is authorised

  1. The key is verified and must be active, unexpired and match the environment.
  2. Your application and account must be active and verified, and not suspended.
  3. The endpoint's scope must be on the key and permitted for your account now.
  4. Rate limits are applied per key and per application.

The account a request acts for always comes from the key. No endpoint accepts a merchant or account ID in the body, so a key can never act for another business.

Keep keys on your server

API keys grant access to your money. Never put them in a website, mobile app, chatbot prompt or public repository. For AI agents use the restricted link key instead.

On this page