Skip to main content
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

TransactionCallback

Notifies you when a card tap completes an authorization attempt.

StopCallback

Notifies you when a consumer presents a card to stop an active session.

TimeoutCallback

Notifies you when a payment session times out before completing.

DeclineCallback

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