StopNotify
Enable
StopNotify
This feature must be enabled in Nayax Core during the integration.
The StopNotify
endpoint enables Spark to determine whether a card presented at the payment terminal while idle is authorized to stop an ongoing session. This is primarily used in Pre-Authorization flows, where the same card must be presented again to terminate the session and proceed to settlement.
Nayax will send the hashed card value and the last four digits captured earlier in the /TransactionCallback
along with terminal identifiers. Providers need to validate whether this card matches an ongoing session on that terminal. A matching card should result in an Approved response; otherwise, Spark should return a Declined verdict.
This feature must be enabled via Nayax Core. If no response is received from Spark within 5 seconds, the flow will be considered a failure from the consumer's perspective.
Request
Send a POST request to Spark/spark/CancelTransaction
endpoint with the following body:
{
"StopSiteId": 4,
"MachineId": 71234996,
"HwSerial": "0434334921100366",
"CardLast4Digits": "1234",
"CardHash": "7f2082ba5dbccf706b6987e75b62083f65b5695bc2d8c827c3e46769d007a9e6",
"CardUid": "1288528281124927"
}
Request Parameters
The table below describes the parameters of the request:
Field | Type | Required | Description |
---|---|---|---|
StopSiteId | Integer | Yes | ID of the site where the card is presented to stop the session |
MachineId | Integer | Yes | Unique ID of the vending machine or device |
HwSerial | String | Yes | Hardware serial number of the terminal |
CardLast4Digits | String | Yes | Last 4 digits of the payment card presented |
CardHash | String | Yes | Hashed value of the card used during the original transaction |
CardUid | String | No | Unique identifier of the card. See a more detailed explanation on the SMC Support page.. |
Response
A successful response will return the following body:
{
"SparkTransactionId": "12c7cec2-c690-4425-9a1f-db0db60e2d8c",
"NayaxTransactionId": 2004545072,
"SiteId": 2,
"StopSiteId": 4,
"MachineId": 71234996,
"HwSerial": "0434334921100366",
"MachineAuTime": "20240205194122328",
"Status": {
"Verdict": "Approved",
"ErrorDescription": "No Errors"
}
}
Response Parameters
The table below describes the parameters of the response:
Field | Type | Description |
---|---|---|
SparkTransactionId | String | The Spark session identifier for the matched transaction |
NayaxTransactionId | Integer | Unique ID for the Nayax transaction |
SiteId | Integer | The original site where the transaction was initiated |
StopSiteId | Integer | The site where the card was presented to stop the session |
MachineId | Integer | ID of the machine where the card was presented |
HwSerial | String | Serial number of the machine |
MachineAuTime | String | Local machine timestamp of the event in the format yyyyMMddHHmmssSSS |
Status.Verdict | String | Indicates whether the stop request was approved or declined |
Status.ErrorDescription | String | Human-readable message with additional context if applicable |
Status.ErrorCode | Number | A numeric code indicating a specific type of error that occurred during the transaction. This field is present only in error responses. |
Updated 8 days ago