Authentication

The API uses an API Key + Secret authentication model. Every request must include a signed Authorization header. The signature is computed from a canonical payload that binds the key to the specific request.

Authorization Header

The header must be present on every request and follow this exact format:

Authorization: HMAC-SHA256 Credential="<api_key>",Date="<datetime>",Signature="<signature>"
PARAMETERDESCRIPTION
CredentialYour API key (the key value issued to you)
DateRequest timestamp in UTC, formatted as YYYYMMDDTHHmmssZ — e.g. 20260614T120000Z
SignatureHMAC-SHA256 signature over the canonical payload (see below)
⚠️

The request timestamp must not differ from the server clock by more than 5 minutes (300 seconds). Requests outside this window are rejected with 401 Request date expired.

The signature is a HMAC-SHA256 digest computed over a canonical payload string, using your API secret as the key.

CANONICALPAYLOAD

Concatenate the following four values, each separated by a newline character ( \n ):

  1. date — The same Date value used in the header
  2. method — HTTP method in uppercase — e.g. GET, POST
  3. path — Request path without the domain — e.g. api/v1/payment-defaults
  4. body_hash — SHA-256 hex digest of the raw request body; use the hash of an empty string for requests with no body
{date}\n{method}\n{path}\n{sha256(body)}
$credential = 'your-api-key';
$secret     = 'your-api-secret';
$datetime   = gmdate('Ymd\THis\Z');  // e.g. "20260614T120000Z"
$method     = 'GET';
$path       = 'api/v1/payment-defaults';
$body       = json_encode(['foo' => 'bar']);

// 1. Build canonical payload
$payload = implode("\n", [
    $datetime,
    $method,
    $path,
    hash('sha256', $body),
]);

// 2. Compute HMAC-SHA256 signature
$signature = hash_hmac('sha256', $payload, $secret);

// 3. Build Authorization header
$authHeader = 'HMAC-SHA256 '
    . 'Credential="' . $credential . '",'
    . 'Date="'       . $datetime   . '",'
    . 'Signature="'  . $signature  . '"';

Authentication and authorisation failures return a JSON error response with one of the following status codes and messages:

StatusMessageCause
401Authorization header missing or invalidHeader absent, wrong scheme, or malformed format
401Invalid or missing date in Authorization headerDate field is absent or does not match the expected format
401Request date expiredTimestamp differs from server time by more than 5 minutes
401API key not foundNo key matching Credential exists
401API key is not validKey exists but is expired or not yet active
401Invalid signatureComputed signature does not match the provided value
401User not foundNo user account linked to this API key
403Account is closedThe associated account has been deactivated
403User does not have API permissionsThe account exists but lacks API access rights