TransactionNotify

The TransactionNotify endpoint is used to notify the integrator about the final details of a charging session, including charger availability, amount, and display information. This request is made after the session has been prepared and the charger is ready for use.

Request

Send a POST request to the TransactionNotify endpoint with the following payload:

{
  "HwSerial": "0434334921100366",
  "MachineId": 71234996,
  "NayaxTransactionId": 2004545072,
  "SparkTransactionId": "12c7cec2-c690-4425-9a1f-db0db60e2d8c",
  "Amount": 10.00,
  "CardLast4Digits": "1234",
  "CardHash": "7f2082ba5dbccf706b6987e75b62083f65b5695bc2d8c827c3e46769d007a9e6",
  "CardUid": "1288528281124927",
  "ServiceStationNumber": "5",
  "SiteId": 2,
  "MachineAuTime": "20240205194122328"
}

Request Parameters

The table below describes the parameters of the request:

FieldTypeRequiredDescription
HwSerialStringYesHardware serial number of the terminal
MachineIdIntegerYesID of the vending machine or service device
NayaxTransactionIdIntegerYesInternal Nayax transaction ID
SparkTransactionIdStringYesUnique ID generated in StartAuthentication
AmountFloatYesThe final amount to charge in central currency units (e.g., dollars)
CardLast4DigitsStringYesThe last four digits of the card presented
CardHashStringYesOne-way hash of the whole card number
CardUidStringYesUnique ID of the card (for contactless cards)
ServiceStationNumberStringYesNumber identifying the service station
SiteIdIntegerYesIdentifier for the Spark site
MachineAuTimeStringYesTimestamp from the device (yyyyMMddHHmmssSSS format)

Response

A successful response will return the following body:

{
  "NayaxTransactionId": 2004545072,
  "SparkTransactionId": "12c7cec2-c690-4425-9a1f-db0db60e2d8c",
  "HwSerial": "0434334921100366",
  "MachineId": 71234996,
  "SiteId": 2,
  "ServiceStationNumber": "5",
  "Status": {
    "Verdict": "Approved",
    "StatusMessage": "Session will begin immediately."
  }
}

Response Parameters

The table below describes the parameters of the response:

FieldTypeDescription
NayaxTransactionIdIntegerEcho of the transaction ID received in the request
SparkTransactionIdStringEcho of the session ID
HwSerialStringEcho of the terminal hardware serial
MachineIdIntegerEcho of the machine ID
SiteIdIntegerEcho of the site ID
ServiceStationNumberStringEcho of the service station number
StatusObjectConfirmation about how to proceed
Status.VerdictStringTypically "Approved" or "Declined"
Status.StatusMessageStringHuman-readable status message