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

*String

Your public API key (pk_test_… or pk_live_…).

secretKey

*String

Your secret API key — never expose this in client-side code or mobile apps.

expiresIn

Integer

Access token lifetime in seconds. Default 900 (15 min), max 86 400 (24 h).

Response

accessToken

String

Bearer token for protected endpoints. Short-lived (default 15 min).

refreshToken

String

Use with POST /v2/auth/refresh to get a new token pair. Valid for 7 days.

tokenType

String

Always "Bearer".

expiresIn

Integer

Access 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