Get an access token
Find your credentials
Your client ID and client secret are under Merchant/API details.
Request a token
POST to the OIDC Token URL with grant_type=client_credentials, your client_id and client_secret.
Call the API
Send the token in the Authorization header as Bearer <token> to the API URL for your environment.
Refresh the token
Tokens last 300 seconds on UAT and 60 seconds in production. Read expires_in from each response and request a new token shortly before it runs out.
curl -X POST \
https://uat-auth.finrelay.io/realms/uat/protocol/openid-connect/token \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d grant_type=client_credentials \
-d client_id=$CLIENT_ID \
-d client_secret=$CLIENT_SECRET
{
"access_token": "eyJz93a...k4laUWw",
"token_type": "Bearer",
"refresh_token": "string",
"expires_in": 300
}
const res = await fetch('https://uat-auth.finrelay.io/realms/uat/protocol/openid-connect/token', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({
grant_type: 'client_credentials',
client_id: process.env.CLIENT_ID,
client_secret: process.env.CLIENT_SECRET,
}),
});
const { access_token, expires_in } = await res.json();
{
"access_token": "eyJz93a...k4laUWw",
"token_type": "Bearer",
"refresh_token": "string",
"expires_in": 300
}
What you need
Integration must be done within our integration environment first. When this process is finished and approved by our staff, you may go live and start processing with real money.
To start integrating with Payments Platform you will need:
| Property | Description |
|---|---|
client_id |
OIDC client_id. Merchant details / Keycloak / client_id |
client_secret |
OIDC client_secret, keep this private. Merchant details / Keycloak / client_secret on dashboard |
terminal_id |
Terminal against which the transaction session is created and authorized. Terminal / ID |
Building with AI?
This documentation is available in machine-readable format for AI coding tools. See AI-Assisted Integration for llms.txt and llms-full.txt URLs you can paste directly into Claude, Cursor, GitHub Copilot, or any other AI assistant.
Choose how to integrate
All three integrations use the same access token. Open one to see its guide.