Skip to main content
To authorize API requests, you use an access token. If you use the Authorization Code flow, you also receive a refresh token to obtain new access tokens. Access tokens are the proof of authorization that our API requires. They must be added to the Authorization header of each request to the Payt API. Each time you need a new access token, you must use the refresh token to request a new one. If your refresh token expires, the user needs to authorize your app again. In order to prevent this, a new refresh token is returned each time a new access token is created. This way your app remains authorized as long as it is used frequently.
TokenExpiryNotes
Access token2 hoursMust be refreshed using the refresh token after expiry.
Refresh token90 daysRotated on every use; a new refresh token is returned each time you create an access token.
As long as your app requests a new access token at least once every 90 days, the refresh token never expires in practice.

Create tokens

A new set of tokens can be created by sending a request to the token endpoint (/oauth/token) using the last received refresh token. The very first refresh token is received during the confirmation step of the authorization process. Request:
POST https://api.paytsoftware.com/oauth/token
Authorization: Basic cS1ReW5uYkREWFZGSkNIVVBnNThFV0hIMm41a0NXYVdZZUo1bFZRTkk3QTpNcTRFMlZGTnNzcjVpQTdaN0xBZFM4MnZtNTl3Qm9nNVE1SGw2Si1Pc0w0

{
  "grant_type": "refresh_token",
  "refresh_token": "PKWuvzHNj3ALI0G7QNBGjBI1-q3aMLZBqgXdaaumk18"
}
HeaderPresenceDefinition
AuthorizationrequiredBasic
ParameterPresenceDefinition
grant_typerequiredMust be: refresh_token.
refresh_tokenrequiredMust be the last refresh token received.
Response:
{
  "access_token": "2GyChYPFxhYOis/uiLoVkA==",
  "created_at": 1577836800,
  "expires_in": 7200,
  "refresh_token": "PKWuvzHNj3ALI0G7QNBGjBI1-q3aMLZBqgXdaaumk18",
  "scope": "invoices:read debtors:read",
  "token_type": "Bearer"
}
KeyValue
access_tokenThe token that can be used to authenticate API requests.
created_atThe UNIX time at which the token was created.
expires_inThe number of seconds the access token is valid.
refresh_tokenThe new refresh token, must be used to create the next token.
scopeList of granted permissions.
token_typeWill always be Bearer.

Introspect a token

Besides the scopes that are granted, you might want to know for which company and which administrations of this company the authorization was granted. This information can be retrieved by sending an active token (either an access token or refresh token) to the introspect endpoint. Request
POST https://api.paytsoftware.com/oauth/introspect
Authorization: Basic cS1ReW5uYkREWFZGSkNIVVBnNThFV0hIMm41a0NXYVdZZUo1bFZRTkk3QTpNcTRFMlZGTnNzcjVpQTdaN0xBZFM4MnZtNTl3Qm9nNVE1SGw2Si1Pc0w0

{
  "token": "IBzLDErQvt9gOmSLarUtDy06emduHZmKEG2OSPdHpJ8"
}
Response
{
  "active": true,
  "administrations": [
    {
      "id": "123",
      "name": "Administration Name"
    },
    {
      "id": "321",
      "name": "Administration Two Name"
    }
  ],
  "client_id": "q-QynnbDDXVFJCHUPg58EWHH2n5kCWaWYeJ5lVQNI7A",
  "company": {
    "id": "123",
    "name": "Company Name"
  },
  "exp": 1577844000,
  "iat": 1577836800,
  "scope": "invoices:read debtors:read",
  "token_type": "Bearer"
}
KeyValue
activeWhether the access token (not the refresh token) is still valid.
administrationsList of administration ids and names the token is granted access to.
client_idThe client_id of the application.
companyThe id and name of the company the token is granted access to.
expThe UNIX time at which the access token (not the refresh token) will expire.
iatThe UNIX time at which the token was created.
scopeList of granted permissions.
token_typeWill always be Bearer.
If the given token has expired, does not belong to your client or does not exist, the following response will be returned: Response:
{
  "active": false
}

Use an access token / static API token

To query the Payt API an active access token must be added to the Authorization header, preceded by Bearer:
GET https://api.paytsoftware.com/v1/invoices?administration_id=123
Authorization: Bearer IBzLDErQvt9gOmSLarUtDy06emduHZmKEG2OSPdHpJ8
Last modified on June 17, 2026