Authorization header. Follow the three steps below to obtain and use a token.
Encode your credentials
Combine your
clientId and clientSecret with a colon, then Base64-encode the result:Request a token
Send a
Body (form-encoded)
A successful response returns a JSON object:
POST request to /api/v1/auth/token with your encoded credentials.HeadersHeader | Value |
|---|---|
Authorization | Basic <base64-encoded-credentials> |
Content-Type | application/x-www-form-urlencoded |
Field | Value |
|---|---|
grant_type | client_credentials |
scope | Space-separated list of scopes (see Available Scopes) |
Available Scopes
Scope | Description |
|---|---|
payments:read | Read access to payments and payment statuses |
payments:write | Ability to initiate new payments |
providers:read | Access to the Capabilities (providers) endpoints |
Request only the scopes your application needs. Requesting excessive scopes increases the blast radius of a compromised token.
Token Expiry
Tokens expire after 1800 seconds (30 minutes). To avoid authentication failures:- Track the
expires_invalue and request a new token before it expires - Implement a token refresh mechanism — re-request using the same credentials
- Never hardcode tokens; always fetch them programmatically at startup and on expiry
Error Responses
Error | Meaning |
|---|---|
invalid_request | Missing or malformed parameters |
invalid_client | Invalid clientId or clientSecret |
invalid_scope | One or more requested scopes are not permitted |
server_error | The auth service is temporarily unavailable — retry with backoff |