Authenticate
Exchange your publicKey and secretKey for a short-lived accessToken (default 15 min) and a refreshToken (valid 7 days). Pass the access token as Authorization: Bearer <accessToken> on every subsequent request.
Use
pk_test_ / sk_test_ key pairs for sandbox and pk_live_ / sk_live_ for production. The key pair determines the environment — no header required.Body
publicKey
*StringYour public API key (pk_test_… or pk_live_…).
secretKey
*StringYour secret API key — never expose this in client-side code or mobile apps.
expiresIn
IntegerAccess token lifetime in seconds. Default 900 (15 min), max 86 400 (24 h).
Response
accessToken
StringBearer token for protected endpoints. Short-lived (default 15 min).
refreshToken
StringUse with POST /v2/auth/refresh to get a new token pair. Valid for 7 days.
tokenType
StringAlways "Bearer".
expiresIn
IntegerAccess token lifetime in seconds.
environment
String"TEST" or "LIVE" — derived from the key pair used.
POST
/ v2/auth/authenticate
Endpoint URL(TEXT)
Request Body
Response(JSON)
// Click 'Try now' to see the response