Mercateer
开发者

通过 Webhook 获取 Mercateer 前台事件

订阅一个端点以接收 Mercateer 事件,在通话结束、潜在客户进入或工单被预订的瞬间即收到已签名的有效载荷。可通过 API 或仪表盘注册和管理端点,并使用 HMAC 验证每次交付。

Webhooks 是什么?

Webhook 会将 Mercateer 前台事件实时推送到您控制的 URL,使您的系统无需轮询 API 即可作出响应。每次交付均为经 HMAC 签名的 JSON 有效载荷,您可通过 API 或仪表盘注册和管理端点,失败的交付将按退避策略重试。

您可以使用 Webhooks 做什么

新潜在客户捕获并创建联系人
IntegrationPages.Conversation started, closed, or handoff requested
IntegrationPages.Call completed
预约已预订及预约已重新安排
IntegrationPages.Quote accepted
您可在接收时验证的 HMAC 签名有效载荷
通过 API 或仪表盘注册和管理端点

几分钟内完成安装

1

创建端点

通过 API 或在“设置”>“开发者”中注册您的 URL 并选择要订阅的事件。Mercateer 将为该端点返回一个签名密钥。Crew 和 Fleet 套餐包含 API 访问权限。

2

验证签名

IntegrationPages.On every delivery, read the timestamp (t) and signature (v1) from the signature header, then compute the HMAC-SHA256 of the string "{timestamp}_{raw request body}" with your signing secret and compare it to the v1 value_ Reject any request that does not match, or whose timestamp is more than 5 minutes old, so you only act on fresh payloads that truly came from Mercateer_ (Our SDK’s verify helper does all of this for you_)

3

幂等地处理重试

快速返回 2xx 响应以确认交付。失败的交付将按退避策略重试,因此请以事件 ID 作为处理键,忽略重复项,确保每个事件仅处理一次。

常见问题

兼容您的全套工具

Mercateer 使用与您现有工具相同的协议。

将 Mercateer 与 Webhooks 结合使用

免费开始,几分钟内连接您的前台系统。

无需信用卡