patch

Archive a token

Archives the specified token, making it permanently inactive.
WARNING! This action is irreversible!

tokenIdstring

required

The ID of the token to archive

Responses

Response examples

The token has been archived.

{
  "data": {
    "id": "string",
    "value": "string",
    "network": "string",
    "isValid": true,
    "type": "AD_HOC_PAYMENT_TERMINAL",
    "whitelistType": "ALWAYS",
    "driver": "string",
    "paymentTerminal": "string",
    "name": "string",
    "expiresAt": "2023-06-07T17:32:28Z",
    "createdAt": "2023-06-07T17:32:28Z",
    "updatedAt": "2023-06-07T17:32:28Z"
  }
}
post

Authorize a token

Checks whether the given token is authorized to charge at a specific asset. Returns authorization status along with the token details or a failure code.

typestring

Whether the tokenId path parameter is a raw token value or a token ID

Default
"ID"
Enum
  • RAW_VALUE
  • ID
assetIdstring

required

The ID of the asset to authorize against

networkIdstring

required

The ID of the network to authorize against

Responses

Request examples

{
  "type": "RAW_VALUE",
  "assetId": "string",
  "networkId": "string"
}

Response examples

Token authorization result

{
  "data": {
    "authorized": true,
    "token": {
      "id": "string",
      "value": "string",
      "network": "string",
      "isValid": true,
      "type": "AD_HOC_PAYMENT_TERMINAL",
      "whitelistType": "ALWAYS",
      "driver": "string",
      "paymentTerminal": "string",
      "name": "string",
      "expiresAt": "2023-06-07T17:32:28Z",
      "createdAt": "2023-06-07T17:32:28Z",
      "updatedAt": "2023-06-07T17:32:28Z"
    }
  }
}
get

List all tokens

Retrieves a paginated list of tokens available to the authenticated user.

limitstring

The maximum number of tokens to return (default 20, maximum 100)

Pattern
^[0-9][0-9]?$|^100$
startingAfterstring

The ID of the last token in the previous page. Results will start after this token.

driverIdstring

Filter tokens by driver ID

Responses

Response examples

A list of tokens

{
  "data": {
    "hasMore": true,
    "items": [
      {
        "id": "string",
        "value": "string",
        "network": "string",
        "isValid": true,
        "type": "AD_HOC_PAYMENT_TERMINAL",
        "whitelistType": "ALWAYS",
        "driver": "string",
        "paymentTerminal": "string",
        "name": "string",
        "expiresAt": "2023-06-07T17:32:28Z",
        "createdAt": "2023-06-07T17:32:28Z",
        "updatedAt": "2023-06-07T17:32:28Z"
      }
    ]
  }
}
post

Create a new token

Creates a new token. Supports multiple token types including PAYMENT_TERMINAL, VEHICLE, RFID, and others.
In V2, use the value field to provide a custom token identifier (replaces the id field from V1).

valuestring

A value can optionally be provided when creating a token. For example to register a VEHICLE token you would create a token with the "value" being the VID. For example VID:A1B2C3D4

paymentTerminalIdstring
driverIdstring
isValidboolean

required

typestring

required

Enum
  • AD_HOC_USER
  • APP_USER
  • OTHER
  • PAYMENT_TERMINAL
  • AD_HOC_PAYMENT_TERMINAL
  • RFID
  • ROAMING_PARTNER
  • VEHICLE
whitelistTypestring

required

Enum
  • ALWAYS
  • ALLOWED
  • ALLOWED_OFFLINE
  • NEVER
networkstring
namestring
expiresAtstring

The ISO date time when the token will expire. If not provided, the token will not expire.

Format
date-time

Responses

Request examples

{
  "value": "string",
  "paymentTerminalId": "string",
  "driverId": "string",
  "isValid": true,
  "type": "AD_HOC_USER",
  "whitelistType": "ALWAYS",
  "network": "string",
  "name": "string",
  "expiresAt": "2023-06-07T17:32:28Z"
}

Response examples

A new token has been created.

{
  "data": {
    "id": "string",
    "value": "string",
    "network": "string",
    "isValid": true,
    "type": "AD_HOC_PAYMENT_TERMINAL",
    "whitelistType": "ALWAYS",
    "driver": "string",
    "paymentTerminal": "string",
    "name": "string",
    "expiresAt": "2023-06-07T17:32:28Z",
    "createdAt": "2023-06-07T17:32:28Z",
    "updatedAt": "2023-06-07T17:32:28Z"
  }
}
get

Retrieve a token by ID

Retrieves a single token by its ID, including its value.

idstring

required

The ID of the token to retrieve

Responses

Response examples

The requested token

{
  "data": {
    "id": "string",
    "value": "string",
    "network": "string",
    "isValid": true,
    "type": "AD_HOC_PAYMENT_TERMINAL",
    "whitelistType": "ALWAYS",
    "driver": "string",
    "paymentTerminal": "string",
    "name": "string",
    "expiresAt": "2023-06-07T17:32:28Z",
    "createdAt": "2023-06-07T17:32:28Z",
    "updatedAt": "2023-06-07T17:32:28Z"
  }
}
patch

Update a token

Updates an existing token. The network field is optional in V2 as it can be derived from JWT claims. Set name or expiresAt to null to clear those fields.

networkstring

required

The network the token is associated with

isActiveboolean

required

Corresponds to the "isValid" field on the token

namestring or null

The name associated with the token

expiresAtstring or null

The ISO date time when the token will expire

Format
date-time
whitelistTypestring
Enum
  • ALWAYS
  • ALLOWED
  • ALLOWED_OFFLINE
  • NEVER

Responses

Request examples

{
  "network": "string",
  "isActive": true,
  "name": "string",
  "expiresAt": "2023-06-07T17:32:28Z",
  "whitelistType": "ALWAYS"
}

Response examples

The token has been updated.

{
  "data": {
    "id": "string",
    "value": "string",
    "network": "string",
    "isValid": true,
    "type": "AD_HOC_PAYMENT_TERMINAL",
    "whitelistType": "ALWAYS",
    "driver": "string",
    "paymentTerminal": "string",
    "name": "string",
    "expiresAt": "2023-06-07T17:32:28Z",
    "createdAt": "2023-06-07T17:32:28Z",
    "updatedAt": "2023-06-07T17:32:28Z"
  }
}

Was this page helpful?