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 StartSessionendpoint. 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:

FieldTypeDescription
HwSerialstringThe serial number of the payment terminal hardware
MachineIdintegerUnique identifier for the machine
TokenIdintegerUnique token provided by Nayax for secure auth
RandomstringRandom 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:

FieldTypeDescription
CipherstringEncrypted data used to authenticate and initiate the session
StatusobjectContains the outcome of the request
Status.Verdictstring"Approved" indicates successful session initiation
Status.ErrorDescriptionStringProvides a human-readable description of any errors that occurred, or indicates No Errors for a successful request.
Status.ErrorCodeNumberA numeric code indicating a specific type of error that occurred during the transaction. This field is present only in error responses.