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

<CardGroup cols={3}>
  <Card icon="credit-card" title="TransactionCallback" href="/docs/integrate-pos-device/spark/webhook-callbacks/transactioncallback">
    Notifies you when a card tap completes an authorization attempt.
  </Card>

  <Card icon="hand" title="StopCallback" href="/docs/integrate-pos-device/spark/webhook-callbacks/stopcallback">
    Notifies you when a consumer presents a card to stop an active session.
  </Card>

  <Card icon="clock" title="TimeoutCallback" href="/docs/integrate-pos-device/spark/webhook-callbacks/timeoutcallback">
    Notifies you when a payment session times out before completing.
  </Card>

  <Card icon="circle-xmark" title="DeclineCallback" href="/docs/integrate-pos-device/spark/webhook-callbacks/declinecallback">
    Notifies you when a transaction fails after authorization begins.
  </Card>
</CardGroup>

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