TransactionCallback

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.

This callback is essential for proceeding to transaction confirmation or rejection handling.

Request

The Spark platform sends a POST request to your configured TransactionCallback endpoint. The payload includes the full result of the card scan operation:

{
  "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
}

Request Parameters

The table below describes all the parameters of the request:

FieldTypeRequiredDescription
NayaxTransactionIdIntegerYesInternal Nayax transaction ID.
SparkTransactionIdStringYesUnique session ID generated in StartAuthentication.
SiteIdIntegerYesID of the vending site or Spark location.
TerminalIdStringYesUnique ID of the terminal that read the card.
MachineIdIntegerYesIdentifier of the vending machine or device.
HwSerialStringYesHardware serial number of the terminal.
AuthStatusObjectYesCard authorization result.
AuthStatus.VerdictStringYesAuthorization decision (Approved, Declined, etc.).
AuthStatus.ErrorCodeIntegerNoAn optional error code if the card was declined.
AuthStatus.ErrorDescriptionStringNoExplanation of the error, if any.
AuthStatus.StatusMessageStringNoStatus message returned by Spark.
CardLast4DigitsStringYesThe last four digits of the presented card.
CardHashStringYesOne-way hash of the full card number.
CardUidStringYesUID of the card (for prepaid cards). See a more detailed explanation on the SMC Support page..
MachineAuTimeStringYesTimestamp from the machine in the format yyyyMMddHHmmssSSS.
AmountIntegerYesTransaction amount in the smallest currency unit (e.g., cents)

📘

Nayax Callback

This is a callback from Nayax, no response body is required. A simple 200 OK server acknowledgment is sufficient.