---
title: "StartAuthentication"
method: POST
path: "/StartAuthentication"
tags: ["Transactions"]
---

# StartAuthentication

`POST /StartAuthentication`

## Request body

- StartAuthenticationRequest, nullable — The request payload for the `/spark/StartAuthentication` endpoint. This call is the initial step for a transaction, authenticating the request and preparing the session.
  - `TokenId` integer — A unique token provided by Nayax to identify your integration.
  - `TerminalId` string — The unique device ID of the target terminal.
  - `TerminalIdType` integer — Defines the type of `TerminalId` being used. Use `1` for the hardware serial number (`HW Serial`) or `2` for the Nayax Machine ID.
  - `Random` string — A random string used as part of the encryption handshake.
  - `Cipher` string — The AES-256 ECB encrypted payload. This is a Base64-encoded string that contains the Spark Transaction ID, a random string, and a timestamp.

## Response `200`

Success. The transaction request was successfully authenticated.

- StartAuthenticationResponse, nullable — The response payload from the `/spark/StartAuthentication` endpoint. It provides a unique hashed transaction ID and the authentication status.
  - `HashedSparkTransactionId` string — A SHA256 hash of the `SparkTransactionId` sent in the request. This ID must be used for all subsequent steps of the transaction.
  - `Status` Status — Transaction Status Details
    - `Verdict` string — Status of the request (Approved / Declined)
    - `ErrorCode` integer, nullable — - Conditional - Reason for declined request
    - `ErrorDescription` string, nullable — - Conditional - Length: 255 - Error description
    - `StatusMessage` string, nullable — - Optional - Length: 255 - Transaction status message as free text field

---

[API](https://skmtc.net/nayax/apis/nayax-cortina-api.md) · [All operations](https://skmtc.net/nayax/apis/nayax-cortina-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nayax/nayax-cortina-api/versions/421f6f83c257/schema)
