TeePayDocs
SDKs

SDKs

Official TeePay client libraries for JavaScript and TypeScript, Python, PHP, Go and Mojo (preview).

The official SDKs wrap the TeePay API for your server. They send your key the right way, add idempotency keys, retry only when it is safe, raise typed errors and verify webhook signatures in constant time.

Source code

Every SDK is open source. Read the code, report issues and follow releases on GitHub.

LanguagePackageRuntime
JavaScript / TypeScript@teepay/sdkNode.js 18 or newer
PythonteepayPython 3.9 or newer, httpx
PHPteepay/teepay-phpPHP 8.1 or newer, ext-curl, ext-json
Gogithub.com/kraftonnotgar-spec/teepay-GoGo 1.22 or newer, no dependencies
Mojo (preview)teepay (from source)Mojo 1.2 or newer, CPython 3.10+

What's in every SDK

  • An authenticated client. Pass a tp_test_ or tp_live_ key, or set TEEPAY_API_KEY. The key is sent only as Authorization: Bearer, is never logged and is hidden when you print the client.
  • Every public endpoint. whoami, capabilities, collections (mobile money push), checkout sessions, Control Numbers and payouts, with automatic pagination over list endpoints.
  • Safe retries. Create calls carry an idempotency key: yours if you pass one, otherwise a generated one that is reused for every retry. Only GET requests and keyed creates are retried, on connection errors, timeouts, 429 and 5xx, honouring Retry-After.
  • Webhook verification. Checks X-TeePay-Signature against the raw body and rejects timestamps more than five minutes away. See Webhooks.
  • Typed errors. One class per error family, including AccountRestrictedError for 403 account_restricted, each with code and request_id.
  • Response metadata. The request ID, rate-limit headers and Idempotent-Replayed of every call.

Field names are exactly the API's (amount_minor, public_reference, checkout_url), so the API reference applies to the SDKs unchanged. Anything the SDK does not cover can be called over HTTP with the same key.

Server-side only

The SDKs use your secret key, which can move money. Run them on your server, never in a browser or a mobile app. The JavaScript SDK refuses to start in a browser.

Sandbox and live

The key decides the environment; both use https://api.teepay.me.

Key prefixenvironmentUse it for
tp_test_sandboxAuthentication, scopes, capability discovery and error handling
tp_live_liveReal payments and payouts

Money movement currently runs in live only. Call capabilities() at start-up instead of hard-coding what your key can do. See Environments.

Don't see your language?

Every endpoint is plain HTTPS and JSON. Follow the Quickstart and the API reference; the Webhooks page has verification code you can copy into any language.

On this page