Payments for finance teams

Getting started

Authentication Overview

Xe uses OAuth 2.0 authorization flows that lets your app access a user’s account without accessing their password. OAuth 2.0 protocol is used for secure API access and supports multiple use cases.
Xe API uses JWT access token to authenticate requests. You can obtain a new JWT token using below the OAuth flows and store the JWT to make further calls to secure endpoints.

Obtain Access Keys

Contact your Xe Integration Manager to get the access_key and access_secret.

Obtain JWT Token

To authenticate API calls, we need a JWT token to be provided in the Authorization header.

Request

Make a POST request to v2/auth/token with your access_key and access_secret keys.

POST https://pay-api.xe.com//v2/auth/token
Body Format:application/json

{
  "accessKey": "{{access_key}}",
  "accessSecret": "{{access_secret}}"
}

Response

The returned JWT will have access_token, refresh_token and expiresAt

{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjEwMCJ9...",
  "refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjEwMCJ9...",
  "id_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjEwMCJ9...",
  "expiresAt": "2025-11-05T17:24:56.1187695+00:00"
}

On this page

Get help