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:

FieldTypeRequiredDescription
StopSiteIdIntegerYesID of the site where the card is presented to stop the session
MachineIdIntegerYesUnique ID of the vending machine or device
HwSerialStringYesHardware serial number of the terminal
CardLast4DigitsStringYesLast 4 digits of the payment card presented
CardHashStringYesHashed value of the card used during the original transaction
CardUidStringNoUnique 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:

FieldTypeDescription
SparkTransactionIdStringThe Spark session identifier for the matched transaction
NayaxTransactionIdIntegerUnique ID for the Nayax transaction
SiteIdIntegerThe original site where the transaction was initiated
StopSiteIdIntegerThe site where the card was presented to stop the session
MachineIdIntegerID of the machine where the card was presented
HwSerialStringSerial number of the machine
MachineAuTimeStringLocal machine timestamp of the event in the format yyyyMMddHHmmssSSS
Status.VerdictStringIndicates whether the stop request was approved or declined
Status.ErrorDescriptionStringHuman-readable message with additional context if applicable
Status.ErrorCodeNumberA numeric code indicating a specific type of error that occurred during the transaction. This field is present only in error responses.