API · Authentication

API v1

The whole API and the SDK live on a single host: https://app.tilopay.com. There is no separate host for testing — see environments.

The two operations#

OperationPathWhat for
API tokenPOST /api/v1/loginServer-to-server API calls
SDK tokenPOST /api/v1/loginSdkThe token passed to Tilopay.Init()

Get the API token#

curl -X POST https://app.tilopay.com/api/v1/login \
  -H "Content-Type: application/json" \
  -d '{ "apiuser": "YOUR_APIUSER", "password": "YOUR_PASSWORD" }'

Body#

apiuserstringrequired#

The merchant API user.

passwordstringrequired#

The merchant API password.

Response#

access_tokenstring#

The token to send on subsequent calls.

token_typestring#

Always bearer.

expires_ininteger#

Token lifetime as an integer in seconds (for example 86400). The exact value comes in this response: do not assume it on the client.

Get the SDK token#

curl -X POST https://app.tilopay.com/api/v1/loginSdk \
  -H "Content-Type: application/json" \
  -d '{ "apiuser": "YOUR_APIUSER", "password": "YOUR_PASSWORD", "key": "YOUR_API_KEY" }'

The resulting token is the one passed to the token parameter of Tilopay.Init().

Lifetime#

  • API token: 24 hours. expires_in arrives as an integer in seconds (for example 86400).
  • SDK token: 1 hour. expires_in arrives as a date-time string (for example "2023-06-05 13:32:06").

The exact value always arrives in expires_in, in each operation's format. Cache it server-side and renew on expiry.

How it is sent#

Authorization: bearer <token>

Revocation and limits#

  • Tokens cannot be revoked. If a token leaks there is no operation to invalidate it: treat the leak as an incident and rotate credentials with Tilopay.
  • There is no limit on concurrent tokens per merchant. You can request one per process without invalidating the previous ones.

Where credentials come from#

apiuser, password and key are obtained in the merchant panel, at Admin panel · Platform integrations. If you do not have access yet, start with developer registration.

Never put apiuser or password in the browser. The login runs on your server; only the SDK token reaches the browser.

Last verified: 2026-10-20

View as raw Markdown