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 has timed out or when a card has been presented to stop a session, respectively. 通过使用这些回调函数,您可以快速处理故障和其他事件,确保系统的事务状态保持准确,而无需不断轮询。

可用的 Webhook

TransactionCallback

停止回调

超时回调

拒绝回调

启用自定义标头(可选)

此功能允许 Nayax 在每次回调到您的系统时发送最多两个静态自定义标头(例如,用于共享密钥或路由 ID),以增强安全性和验证。 要为您的集成启用自定义标头:
  1. 请求启用– 联系您的 Nayax 集成支持工程师,并请求在 Nayax 后台中为您的集成启用自定义标头。
  2. 提供请求头详细信息——与您的集成支持工程师共享以下信息:
    • 标题键 – 最多 2 个键(最少 1 个)。
    • 标题值 – 最多 2 个值(最少 1 个)。