Get started

Authentication and API keys

Create a secret API key, choose its permissions and send it in the Authorization header.

1Create an API key

  1. 1In the dashboard, open API keys and click New API key.
  2. 2Choose the Secret type. It starts with tcb_sk_.
  3. 3Choose the Live environment.
  4. 4Tick only the scopes your integration uses.
  5. 5Optionally, set an expiry date.

The key is shown only once

Copy it and store it on your server, for example in an environment variable. Never put it in your frontend or in a repository.
Terminal
Shell
# Keep it in a server environment variableexport TUCAPI_KEY=tcb_sk_live_…

2Send it with every request

Send the key in the Authorization header with the Bearer scheme:

HTTP
Authorization: Bearer tcb_sk_live_…

A valid key with the right scope gets a 200. Try GET /v1/balance (scope balance:read).

curl "https://api.business.tucapi.com/v1/balance" \  -H "Authorization: Bearer $TUCAPI_KEY"
Response
{  "object": "balance",  "available": {    "amount": "1240.55",    "currency": "USDT"  },  "pending": {    "amount": "120.33",    "currency": "USDT"  },  "updatedAt": "2026-09-15T18:50:31Z"}

Key types

KeyWorks with the API?
Secret live tcb_sk_live_…Yes. It's the only one that authorizes calls.
Publishable tcb_pk_…No. Returns 401 publishable_key_not_allowed.
Any sandbox keyNo. Returns 401 sandbox_not_supported.

Scopes

Each scope unlocks a group of endpoints. Give each integration only what it needs.

ScopeAllows
orders:writeCreate charges (POST /v1/charges) and subscribe or cancel customers on recurring billing.
orders:readRetrieve charges, orders, plans and subscriptions.
balance:readRetrieve the balance.
statements:readList and download fee statements.

If the key lacks the scope, the response is 403 insufficient_scope.

Best practices

  • Use a different key per integration. That way you can revoke one without touching the others.
  • If a key leaks, revoke it in the dashboard and create a new one. Revocation is immediate.
  • Always call the API from your server, never from the browser.

Authentication errors

HTTPcodeWhat happened
401missing_api_keyYou didn't send the Authorization header.
401invalid_api_keyThe key doesn't exist or was revoked.
401api_key_expiredThe key has expired.
401publishable_key_not_allowedYou used a publishable key.
401sandbox_not_supportedYou used a sandbox key.
403insufficient_scopeThe key doesn't have the endpoint's scope.
403merchant_not_activeYour merchant account isn't active.
429rate_limitedToo many failed attempts with the same key. Wait Retry-After seconds.