Skip to main content

API keys & authentication

The platform’s two domains each have their own key. A third key — the Partner Key — is the master credential you use to provision both. Three keys, three scopes, three blast radii.

The three keys

Partner and Processing keys share the tp_sk_live_… / tp_sk_test_… prefix — you cannot tell them apart by looking at the string. The scope (partner vs one TPA) is attached server-side to the key, not encoded in the prefix. Keep your Partner Key clearly labelled in your secret manager; it is the only tp_sk_… key that can provision.
Never use the Partner Key in your runtime path. Mint a CRM Key and/or a Processing Key per merchant on creation, store them next to the merchant’s record in your secret manager, and use only those thereafter. A leaked scoped key exposes one merchant — never your whole partnership.
API keys ≠ Ops roles. Partner / CRM / Processing keys authenticate the Node SDK and REST. They do not carry Clerk tgdRoles and do not open the Ops dashboard. Human access to Ops uses the payment_ops job (+ scope) — see Partners overview → Humans vs machines and IAM Overview.

Getting your Partner Key

Your first key cannot be bootstrapped via API — it’s minted for you.
Use a live Partner Key for production merchants. A test Partner Key (tp_sk_test_…) can only mint test keys — it cannot mint live CRM or Processing keys. Trying to do so returns 403 mode_escalation_forbidden.

CRM Keys (sk_crm_…) — the merchant control plane

A CRM Key authenticates the public API (/api/public/v1/*) for one merchant (acc_xxx): orders, stores, customers, subscriptions, promotions.
New format, backward compatible. New CRM Keys are minted as sk_crm_…. Existing UUID tokens keep working unchanged — authentication looks up the presented token regardless of prefix. You don’t have to migrate anything.
The token field is only returned on creation. Only the prefix is kept for display. If you lose the token, revoke and mint a new one.
A merchant client then uses that token directly:

Processing Keys (tp_sk_…) — charging & reporting

A Processing Key authenticates the Processing API (/api/tagadapay/v1/*) for one TPA (tpa_xxx): charges, refunds, balance transactions, disputes, payouts.
Labels are auto-assigned as {PartnerName} — {externalRef} (falls back to the TPA id when externalRef is missing). Set externalRef on the TPA so keys are easy to tell apart.
The secret field is only returned on creation. Store it in your secret manager immediately. If you lose it, revoke and re-mint.

Don’t share keys across merchants — the security boundary disappears if you do.

Authenticating requests

All three keys use the same Bearer header; only the base URL differs by domain.
The SDK handles the header and the right base URL for you:

Scope enforcement

The server enforces scope on every request:

Revocation & rotation

Revocation is immediate and irreversible — subsequent calls with that secret get HTTP 401; in-flight calls complete. A lastUsedAt timestamp updates on every call, useful to confirm a key is safe to revoke.

Test mode

Test keys carry a _test_ segment (tp_sk_test_… for both Partner and Processing keys, sk_crm_test_… for CRM keys):
Test mode routes to test processors, returns mock 3DS challenges, moves no real money, and lives in a fully isolated namespace — you can’t mix test and live keys in the same client.