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:
Field | Type | Required | Description |
---|---|---|---|
HwSerial | String | Yes | Hardware serial number of the terminal |
MachineId | Integer | Yes | ID of the vending machine or service device |
NayaxTransactionId | Integer | Yes | Internal Nayax transaction ID |
SparkTransactionId | String | Yes | Unique ID generated in StartAuthentication |
Amount | Float | Yes | The final amount to charge in central currency units (e.g., dollars) |
CardLast4Digits | String | Yes | The last four digits of the card presented |
CardHash | String | Yes | One-way hash of the whole card number |
CardUid | String | Yes | Unique ID of the card (for contactless cards) |
ServiceStationNumber | String | Yes | Number identifying the service station |
SiteId | Integer | Yes | Identifier for the Spark site |
MachineAuTime | String | Yes | Timestamp 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:
Field | Type | Description |
---|---|---|
NayaxTransactionId | Integer | Echo of the transaction ID received in the request |
SparkTransactionId | String | Echo of the session ID |
HwSerial | String | Echo of the terminal hardware serial |
MachineId | Integer | Echo of the machine ID |
SiteId | Integer | Echo of the site ID |
ServiceStationNumber | String | Echo of the service station number |
Status | Object | Confirmation about how to proceed |
Status.Verdict | String | Typically "Approved" or "Declined" |
Status.StatusMessage | String | Human-readable status message |
Updated about 1 month ago