> ## Documentation Index
> Fetch the complete documentation index at: https://devzone.nayax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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:

```json theme={null}
{
  "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": 15.0,
  "CardBrand": "MASTERCARD",
  "CardFirst6Digits": "555561",
  "AuthCode": "3494297",
  "AuTime": "20240205194122328",
  "CurrencyCode": "ILS",
  "CurrencyNumeric": "376",
  "FiscalRrn": "1A2b3C4d5E6f7g8H9i",
  "NayaxRRN": "527109494297"
}
```

### 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](/docs/integrate-pos-device/spark/additional-resources/smc-support) page. |
| `MachineAuTime`               | String  | Yes      | Timestamp from the machine in the format `yyyyMMddHHmmssSSS`.                                                                                                      |
| `Amount`                      | Number  | Yes      | Transaction amount in the main currency unit (decimal place 0, e.g., 15.0 for \$15.00)                                                                             |
| `CardBrand`                   | String  | No       | Card brand used (e.g., Visa, MasterCard).                                                                                                                          |
| `CardFirst6Digits`            | String  | No       | The first 6 digits of the credit card (card BIN).                                                                                                                  |
| `AuthCode`                    | String  | No       | Authorization code returned by the payment provider.                                                                                                               |
| `AuTime`                      | String  | No       | Authorization server timestamp.                                                                                                                                    |
| `CurrencyCode`                | String  | No       | ISO currency code (e.g., "EUR").                                                                                                                                   |
| `CurrencyNumeric`             | String  | No       | ISO 4217 numeric code (e.g., "978").                                                                                                                               |
| `FiscalRrn`                   | String  | No       | Fiscal reference number for accounting/reporting.                                                                                                                  |
| `NayaxRRN`                    | String  | No       | Internal Nayax settlement reference number.                                                                                                                        |

<Note>
  **Nayax Callback**

  This is a callback from Nayax, no response body is required. A simple 200 OK server acknowledgment is sufficient.
</Note>
