Skip to main content
POST
/
TransactionCallback
TransactionCallback
curl --request POST \
  --url https://{domain}/api/TransactionCallback \
  --header 'Content-Type: application/json' \
  --data '
{
  "NayaxTransactionId": 2004545072,
  "SparkTransactionId": "12c7cec2-c690-4425-9a1f-db0db60e2d8c",
  "SiteId": 2,
  "TerminalId": "0434334921100366",
  "MachineId": 71234996,
  "HwSerial": "0434334921100366",
  "AuthStatus": {
    "Verdict": "Approved",
    "ErrorCode": 0,
    "ErrorDescription": "",
    "StatusMessage": ""
  },
  "CardLast4Digits": "1234",
  "CardHash": "7f2082ba5dbccf706b6987e75b62083f65b5695bc2d8c827c3e46769d007a9e6",
  "CardUid": "1288528281124927",
  "MachineAuTime": "20240205194122328",
  "Amount": 1500
}
'
{
  "SparkTransactionId": "12c7cec2-c690-4425-9a1f-db0db60e2d8c",
  "Status": {
    "Verdict": "Approved",
    "ErrorDescription": "No Errors"
  }
}
The terminal uses the TransactionCallback endpoint to notify the integrator about the result of a card tap. It is triggered automatically when a user presents a card, and an authorization flow is initiated with the payment provider.

Body

application/json

The request payload including the result of the card scan operation.

The request payload sent by the Spark platform to the integrator's configured TransactionCallback endpoint. This request includes the full result of the card scan operation and is essential for proceeding with transaction confirmation or rejection handling.

NayaxTransactionId
integer<int64>

The unique internal transaction ID assigned by Nayax.

SparkTransactionId
string | null

The unique session ID generated in StartAuthentication.

SiteId
integer<int16>

The ID of the vending site or Spark location.

TerminalId
string

The unique ID of the terminal that read the card.

MachineId
integer<int64>

The identifier of the vending machine or device.

HwSerial
string

The hardware serial number of the terminal.

MachineAuTime
string | null

The timestamp from the machine in the format yyyyMMddHHmmssSSS.

AuthStatus
object

The object containing the card authorization result.

Example:
{
"Verdict": "Approved",
"ErrorCode": 0,
"ErrorDescription": "",
"StatusMessage": ""
}
CardLast4Digits
string | null

The last four digits of the presented card.

CardHash
string

The one-way hash of the full card number.

CardUid
string | null

The unique identifier of the card (for prepaid cards).

Amount
number<double>

The transaction amount in the smallest currency unit (e.g., cents).

Response

200 - application/json
object | null

Success. A simple 200 OK server acknowledgment is sufficient.

The response payload from the integrator to Nayax's TransactionCallback, confirming the receipt of the transaction result. This callback is triggered when a user presents a card and an authorization flow is initiated.

SparkTransactionId
string | null

The unique identifier for the Spark session. This ID is generated during StartAuthentication.

Status
object

Transaction Status Details