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.
JavaScript / TypeScript
npm install @teepay/sdk · Node.js 18+, ESM and CommonJS, zero dependencies.
Python
pip install teepay · Python 3.9+, sync and async clients.
PHP
composer require teepay/teepay-php · PHP 8.1+, ext-curl and ext-json only.
Go
go get github.com/kraftonnotgar-spec/teepay-Go · Go 1.22+, standard library only.
Mojo (preview)
Mojo 1.2+ on Linux and macOS · Python interop, standard library only.
Source code
Every SDK is open source. Read the code, report issues and follow releases on GitHub.
| Library | Repository |
|---|---|
| JavaScript / TypeScript | github.com/kraftonnotgar-spec/teepay-node |
| Python | github.com/kraftonnotgar-spec/teepay-python |
| PHP | github.com/kraftonnotgar-spec/teepay-php |
| Go | github.com/kraftonnotgar-spec/teepay-Go |
| Mojo (preview) | github.com/kraftonnotgar-spec/teepay-mojo |
| Language | Package | Runtime |
|---|---|---|
| JavaScript / TypeScript | @teepay/sdk | Node.js 18 or newer |
| Python | teepay | Python 3.9 or newer, httpx |
| PHP | teepay/teepay-php | PHP 8.1 or newer, ext-curl, ext-json |
| Go | github.com/kraftonnotgar-spec/teepay-Go | Go 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_ortp_live_key, or setTEEPAY_API_KEY. The key is sent only asAuthorization: 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
GETrequests and keyed creates are retried, on connection errors, timeouts,429and5xx, honouringRetry-After. - Webhook verification. Checks
X-TeePay-Signatureagainst the raw body and rejects timestamps more than five minutes away. See Webhooks. - Typed errors. One class per error family, including
AccountRestrictedErrorfor403 account_restricted, each withcodeandrequest_id. - Response metadata. The request ID, rate-limit headers and
Idempotent-Replayedof 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 prefix | environment | Use it for |
|---|---|---|
tp_test_ | sandbox | Authentication, scopes, capability discovery and error handling |
tp_live_ | live | Real 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.