Start building
Help

Manual integration

If your integration runs in a web client, use the JavaScript SDK. It is the supported way to integrate Revolut ID in the browser and handles the authorisation request, PKCE, and the popup and redirect flows for you.

If you integrate from a backend, a broker, or any other environment without a browser page that can mount the SDK, you can implement the flow yourself. Revolut ID is a standard OAuth 2.0 Authorisation Code flow with PKCE (RFC 7636), so any OpenID Connect relying party can integrate by building the authorisation request and exchanging the code itself, as described on this page.

Before you begin, configure your OAuth client. You need its client ID, its client secret, and a registered redirect URI.

Endpoints

PurposeProductionSandbox
Authorisationhttps://sso.revolut.com/signinhttps://sandbox-sso.revolut.com/signin
Tokenhttps://sso.revolut.com/api/tokenhttps://sandbox-sso.revolut.com/api/token
Userinfohttps://sso.revolut.com/api/userinfohttps://sandbox-sso.revolut.com/api/userinfo
Discoveryhttps://sso.revolut.com/.well-known/openid-configurationhttps://sandbox-sso.revolut.com/.well-known/openid-configuration
JWKShttps://sso.revolut.com/api/jwks.jsonhttps://sandbox-sso.revolut.com/api/jwks.json

Always use the host that matches the environment your client is registered in. A sandbox client only works against the sandbox host, and vice versa.

Authorisation request

Redirect the user's browser to the authorisation endpoint with these query parameters:

ParameterRequiredDescription
response_typeYesMust be code.
client_idYesYour client ID from the Revolut Business portal.
redirect_uriYesAbsolute URI registered on your client. It must match exactly, including scheme, host, and path.
scopeYesSpace-separated list of scopes, for example openid profile email. See available scopes.
code_challengeYesPKCE challenge derived from your code_verifier (see below).
code_challenge_methodYesMust be S256.
stateRecommendedOpaque value echoed back to your redirect_uri. Use it to carry your own request context and to protect against CSRF.
nonceOptionalUp to 16 characters: letters, digits, or underscores. It is validated but currently not echoed back in the ID token, so do not rely on it in the code flow.
claimsOptionalURL-encoded JSON for verified identity claims (OIDC4IDA).
ui_localesOptionalBCP 47 language tag or a space-separated preference list, for example en-GB en fr.
country_codesOptionalSpace-separated ISO 3166-1 alpha-2 codes restricting the countries offered for sign-in.

Generating the PKCE pair

import crypto from 'crypto'

// 43 characters from the unreserved set
const codeVerifier = crypto.randomBytes(32).toString('base64url')

const codeChallenge = crypto
  .createHash('sha256')
  .update(codeVerifier)
  .digest('base64url')

Keep the code_verifier server-side, keyed to the browser session — you need it exactly once, at the token exchange.

Building the URL

const claims = {
  userinfo: {
    verified_claims: {
      verification: {
        trust_framework: null,
        time: null,
      },
      claims: {
        given_name: null,
        age_over_18: null,
      },
    },
  },
}

const authorizeUrl = new URL('https://sso.revolut.com/signin')

authorizeUrl.searchParams.set('response_type', 'code')
authorizeUrl.searchParams.set('client_id', process.env.REVOLUT_CLIENT_ID)
authorizeUrl.searchParams.set('redirect_uri', 'https://your-app.com/callback')
authorizeUrl.searchParams.set('scope', 'openid profile')
authorizeUrl.searchParams.set('state', state)
authorizeUrl.searchParams.set('code_challenge', codeChallenge)
authorizeUrl.searchParams.set('code_challenge_method', 'S256')
authorizeUrl.searchParams.set('claims', JSON.stringify(claims)) // omit unless requesting verified claims

Then redirect the user to authorizeUrl.

Handling the callback

On success, the browser lands on your redirect_uri with an authorisation code:

https://your-app.com/callback?code=...&state=...

Before doing anything else, validate the state value against what you sent:

const url = new URL(request.url)
const code = url.searchParams.get('code')
const state = url.searchParams.get('state')

if (state !== expectedState) {
  throw new Error('State mismatch, possible CSRF')
}

Exchange the code immediately — authorisation codes are single-use and short-lived. Continue with Code exchange for the token request, ID token claims, and verification.

Error handling

When a failure occurs after the request is validated, the browser is redirected back to your redirect_uri with the standard OAuth error parameters:

https://your-app.com/callback?error=access_denied&error_description=...&state=...
ParameterDescription
errorStandard OAuth error code, for example access_denied
error_descriptionHuman-readable details
stateThe state value you sent

If client_id or redirect_uri fail validation, the user is shown an error page at Revolut instead of being redirected — there is nothing safe to redirect to. Treat a missing callback as a configuration error.

What's next

Code exchange
Exchange the code for tokens, verify the ID token, and call userinfo
Verified identity claims
Request OIDC4IDA verified claims with document evidence
OIDC configuration
Discovery endpoints and the discovery document
Rate this page