Skip to content

Get started · Overview

Make your first request to the Finrelay API

Exchange your client credentials for an access token, build and test against UAT, then switch to production when you go live.

Environments
OIDC Token URL
https://uat-auth.finrelay.io/realms/uat/protocol/openid-connect/token
API URL
https://uat-api.finrelay.io
OIDC Token URL
https://auth.finrelay.io/realms/production/protocol/openid-connect/token
API URL
https://api.finrelay.io

These values are referenced throughout the docs.

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.

POST /token
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
Response · 200 OK
{
  "access_token": "eyJz93a...k4laUWw",
  "token_type": "Bearer",
  "refresh_token": "string",
  "expires_in": 300
}
POST /token
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();
Response · 200 OK
{
  "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.

Hosted Payment Page

Redirect customers to a checkout hosted by Finrelay.

PCI DSS scopeLowest

Open guide

Embedded Fields

Secure card fields inside your own checkout page.

PCI DSS scopeReduced

Open guide

API Integration

Build the checkout yourself and call the API directly.

PCI DSS scopeFull

Open guide

Go further

API Integration Guidelines

Conventions to follow in every request.

Read guidelines

AI-Assisted Integration

Build your integration with an AI coding assistant.

Read guide

Changelog

Latest changes to the API and platform.

View changelog