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

# TimeoutCallback

<Note>
  **Pre-Authorization Only**

  This method is only relevant for transactions with Pre-Authorization.
</Note>

The `TimeoutCallback` API call notifies that the payment session has timed out due to inactivity or failure to complete the expected flow within a defined period. This callback is typically triggered when the user does not proceed with the session after a pre-authorization and no further actions, such as `CancelTransaction` or `Settlement`, are received.

It serves as a final indication that the session should be considered terminated.

<Warning>
  **Timed-out Session**

  Do not attempt any further actions for the timed-out session. Use the `SparkTransactionId` to reconcile or log the timeout event.
</Warning>

## Request

Spark sends a POST request to your configured `TimeoutCallback` endpoint. The request body is as in the example below:

```json theme={null}
{
  "TerminalId": "0434334921100366",
  "MachineId": 71234996,
  "HwSerial": "0434334921100366",
  "SparkTransactionId": "12c7cec2-c690-4425-9a1f-db0db60e2d8c"
}

```

### Request Parameters

The table below describes the parameters of the request.

| Field                | Type    | Required | Description                                                |
| -------------------- | ------- | -------- | ---------------------------------------------------------- |
| `TerminalId`         | String  | Yes      | Identifier of the terminal that initiated the transaction. |
| `MachineId`          | Integer | Yes      | ID of the vending machine or device.                       |
| `HwSerial`           | String  | Yes      | Hardware serial number of the terminal.                    |
| `SparkTransactionId` | String  | Yes      | Unique Spark transaction identifier.                       |

<Note>
  **Nayax Callback**

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