事件类型列表
本文档列出了 GStable 目前支持的所有可订阅 Webhook 事件。你可以根据业务需求,在创建 Webhook 时选择订阅特定的事件类型。
Payload 数据结构说明
正如 验签与处理 中所述,所有事件的 payload 字段内部包含了发生变更的资源对象。
为了简化开发,Payload 中的数据结构与对应资源的 API 查询接口返回结构保持一致:
- Session 事件 (
session.*):payload.sessionData对应 查询支付会话 的响应数据。 - Payment Link 事件 (
payment.link.*):payload.linkData对应 查询支付链接 的响应数据。 - Product 事件 (
product.*):payload.productData对应 查询商品 的响应数据。 - Account 事件 (
account.*):payload.accountData对应 查询账户 的响应数据。
支持的事件列表
Account 事件
| 事件类型 (Event Type) | 描述 (Description) |
|---|---|
account.created | The account has been created. |
account.updated | The account has been updated. |
account.removed | The account has been removed, and the account is no longer available for payment. |
PaymentLink 事件
| 事件类型 (Event Type) | 描述 (Description) |
|---|---|
payment.link.created | The payment link has been created. |
payment.link.updated | The payment link has been updated. |
payment.link.disabled | The payment link has been disabled. The link is no longer available for payment. |
payment.link.enabled | The payment link has been enabled. The link is now available for payment. |
Product 事件
| 事件类型 (Event Type) | 描述 (Description) |
|---|---|
product.created | The product has been created. |
product.updated | The product has been updated. |
product.unarchived | The product has been unarchived. The product is now available for payment. |
product.archived | The product has been archived. The product is no longer available for payment. |
product.removed | The product has been removed. The product is no longer available for payment. |
Session 事件
| 事件类型 (Event Type) | 描述 (Description) |
|---|---|
session.created | The session has been created and is awaiting payment. |
session.paid | The user has successfully paid onchain and is awaiting settlement. Can be considered as payment completed, but not settled completed. |
session.settling | The payment has been confirmed and is being settled. Only for cross-chain payments. Typically occurs after payment success. |
session.completed | The session has been completed and the payment is settled. The funds have been received by the recipient. |
session.expired | The session has expired and the payment is not settled. The session is no longer available for payment. |
session.cancelled | The session has been cancelled and the payment is not settled. The session is no longer available for payment. |
session.settlement.pending | Settlement is temporarily delayed. The system is automatically retrying, and no action is required. Settlement will be completed. |