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:
Field | Type | Required | Description |
---|---|---|---|
NayaxTransactionId | Integer | Yes | Internal Nayax transaction ID. |
SparkTransactionId | String | Yes | Unique session ID generated in StartAuthentication . |
SiteId | Integer | Yes | ID of the vending site or Spark location. |
TerminalId | String | Yes | Unique ID of the terminal that read the card. |
MachineId | Integer | Yes | Identifier of the vending machine or device. |
HwSerial | String | Yes | Hardware serial number of the terminal. |
AuthStatus | Object | Yes | Card authorization result. |
AuthStatus.Verdict | String | Yes | Authorization decision (Approved , Declined , etc.). |
AuthStatus.ErrorCode | Integer | No | An optional error code if the card was declined. |
AuthStatus.ErrorDescription | String | No | Explanation of the error, if any. |
AuthStatus.StatusMessage | String | No | Status message returned by Spark. |
CardLast4Digits | String | Yes | The last four digits of the presented card. |
CardHash | String | Yes | One-way hash of the full card number. |
CardUid | String | Yes | UID of the card (for prepaid cards). See a more detailed explanation on the SMC Support page.. |
MachineAuTime | String | Yes | Timestamp from the machine in the format yyyyMMddHHmmssSSS . |
Amount | Integer | Yes | Transaction 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.
Updated 8 days ago