StartAuthentication endpoint is the first step for any External Settlement. Use this to verify your server’s identity with Nayax and create a secure link for the transaction.
cipher. This string tells Nayax which transaction you are working on and proves the request is current.
| Section | Type | Position | Description |
|---|---|---|---|
| Spark Transaction ID | String | 1-36 | Your unique GUID (with hyphens). |
| Separator | Special | 37 | Must be the = symbol. |
| Random String | String | 38-54 | A 17-character random alphanumeric string. |
| Timestamp | Numeric | 55-64 | Current UTC time in YYMMDDhhmm format. |
12c7cec2-c690-4425-9a1f-db0db60e2d8c=123456789qwertyui2602041044
...wRvTVTkungMIKThTVbj_fiXdfoGclhn0wRvTVTkungMIKThTVbj_fiXdfoGclhn0CipherExpMinutes variable.Random field in your JSON request must be exactly the same as the random string you put inside the cipher.HashedSparkTransactionId. You must hash your original Transaction ID using SHA-256 and ensure it matches Nayax’s version to verify the response is authentic.| Error Code | Meaning | What to Check |
|---|---|---|
| 28 | Invalid Token | Check if your Token ID is correct, active, and associated with your account. |
| 30 | Validation Failed | Your JSON Random field doesn’t match the one in your cipher. |
| 31 | Expired Request | Your timestamp is too old (longer than 5 minutes). Sync your server clock to UTC. |
| 34 | Decryption Failure | Your cipher format is wrong or the = is missing from the 37th character. |
The request payload for transaction authentication.
The request payload for the /spark/StartAuthentication endpoint. This call is the initial step for a transaction, authenticating the request and preparing the session.
A unique token provided by Nayax to identify your integration.
The unique device ID of the target terminal.
Defines the type of TerminalId being used. Use 1 for the hardware serial number (HW Serial) or 2 for the Nayax Machine ID.
A random string used as part of the encryption handshake.
The AES-256 ECB encrypted payload. This is a Base64-encoded string that contains the Spark Transaction ID, a random string, and a timestamp.
Success. The transaction request was successfully authenticated.
The response payload from the /spark/StartAuthentication endpoint. It provides a unique hashed transaction ID and the authentication status.