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

# Webhook Callbacks

Webhooks are a crucial part of the Spark API, as they serve as automatic callbacks that alert your system to important events without requiring constant monitoring. For example, the `DeclineCallback` is triggered if a transaction fails after a successful `TriggerTransaction` request. This could happen if a consumer cancels the transaction on the device or if the terminal times out. Other webhooks, like `TimeoutCallback` and `StopCallback`, let you know when a session times out or when a consumer presents a card to stop a session, respectively.

By using these callbacks, you can quickly handle failures and other events, ensuring your system's transaction state remains accurate without requiring constant polling.

## Available Webhooks

> [card] [TransactionCallback](https://devzone.nayax.com/docs/integrate-pos-device/spark/webhook-callbacks/transactioncallback.md)
>
> Notifies you when a card tap completes an authorization attempt.

> [card] [StopCallback](https://devzone.nayax.com/docs/integrate-pos-device/spark/webhook-callbacks/stopcallback.md)
>
> Notifies you when a consumer presents a card to stop an active session.

> [card] [TimeoutCallback](https://devzone.nayax.com/docs/integrate-pos-device/spark/webhook-callbacks/timeoutcallback.md)
>
> Notifies you when a payment session times out before completing.

> [card] [DeclineCallback](https://devzone.nayax.com/docs/integrate-pos-device/spark/webhook-callbacks/declinecallback.md)
>
> Notifies you when a transaction fails after authorization begins.

### Enable Custom Headers (Optional)

This feature allows Nayax to send up to two static custom headers (e.g., for a shared secret or routing ID) with every callback to your system for enhanced security and verification.

To enable custom headers for your integration:

1. **Request enablement** – Contact your Nayax Integration Support Engineer and ask to enable custom headers for your integration in the Nayax Backoffice.
2. **Provide header details** – Share the following information with your Integration Support Engineer:
   * Header Key – Up to 2 keys (minimum 1).
   * Header Value – Up to 2 values (minimum 1).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.