Authentication

Terminal activation, OAuth bearer tokens, and device flow.

POST/api/v1/activate

Activate a terminal with a 6-digit code. Returns clientId, clientSecret, and tokenEndpoint for OAuth.

Auth: None (public)

Request Body

FieldTypeRequiredDescription
activationCodestringYes6 alphanumeric characters

Response Example

{
  "configId": 123,
  "terminalId": "TERM001",
  "company": "Acme Coffee",
  "userId": 42,
  "clientId": "abc...",
  "clientSecret": "shh...",
  "tokenEndpoint": "https://payus.co.nz/api/v1/oauth/token",
  "branchId": 17,
  "terminalAccess": true
}
SandboxCalls go to https://payus.co.nz
POST/api/v1/oauth/token

Exchange client credentials for a JWT bearer token.

Auth: Basic Auth (clientId:clientSecret)

Response Example

{
  "token": "<jwt>",
  "type": "Bearer",
  "expiryDate": "2026-04-08T13:30:00Z"
}
SandboxCalls go to https://payus.co.nz

Authentication

POST/api/v1/device/code

Start an OAuth device flow. Returns a user code for the operator to enter on a verification page.

Auth: None (public)

Request Body

FieldTypeRequiredDescription
clientIdstringYesThe terminal's client ID
deviceModelstringNoe.g. 'Sunmi V2'
serialNumberstringNoDevice serial

Response Example

{
  "deviceCode": "long-opaque-code",
  "userCode": "ABCD-1234",
  "verificationUri": "https://payus.co.nz/device",
  "expiresIn": 600,
  "interval": 5
}
SandboxCalls go to https://payus.co.nz

Authentication