StartSession
This is the initial API call sent by Nayax. It initiates the transaction session by authenticating both parties and generating a SparkTransactionId
, which will be echoed in all subsequent calls throughout the transaction's lifecycle.
Request
The Spark platform sends a POST request to your configured StartSession
endpoint. The payload includes the following body:
{
"HwSerial": "0434334921100366",
"MachineId": 71234996,
"TokenId": 116383,
"Random": "123456789qwertyui"
}
Request Parameters
The table below describes the parameters of the request:
Field | Type | Description |
---|---|---|
HwSerial | string | The serial number of the payment terminal hardware |
MachineId | integer | Unique identifier for the machine |
TokenId | integer | Unique token provided by Nayax for secure auth |
Random | string | Random string for session verification |
Response
A successful response will return the following body:
{
"Cipher": "X305dITNTAw2vHsxE+taVcn6UvgBC3fdI6QbqeABgHbo8CKsoZhqISJfslehCiA+L7XYrqvKFci7C6BNj/trzBuNJwBEjgBzKhhgpJ5ggnw=",
"Status": {
"Verdict": "Approved"
}
}
Response Parameters
The table below describes the parameters of the response:
Field | Type | Description |
---|---|---|
Cipher | string | Encrypted data used to authenticate and initiate the session |
Status | object | Contains the outcome of the request |
Status.Verdict | string | "Approved" indicates successful session initiation |
Status.ErrorDescription | String | Provides a human-readable description of any errors that occurred, or indicates No Errors for a successful request. |
Status.ErrorCode | Number | A numeric code indicating a specific type of error that occurred during the transaction. This field is present only in error responses. |
Updated 3 days ago