跳到主要内容

事件类型列表

本文档列出了 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.createdThe account has been created.
account.updatedThe account has been updated.
account.removedThe account has been removed, and the account is no longer available for payment.

PaymentLink 事件

事件类型 (Event Type)描述 (Description)
payment.link.createdThe payment link has been created.
payment.link.updatedThe payment link has been updated.
payment.link.disabledThe payment link has been disabled. The link is no longer available for payment.
payment.link.enabledThe payment link has been enabled. The link is now available for payment.

Product 事件

事件类型 (Event Type)描述 (Description)
product.createdThe product has been created.
product.updatedThe product has been updated.
product.unarchivedThe product has been unarchived. The product is now available for payment.
product.archivedThe product has been archived. The product is no longer available for payment.
product.removedThe product has been removed. The product is no longer available for payment.

Session 事件

事件类型 (Event Type)描述 (Description)
session.createdThe session has been created and is awaiting payment.
session.paidThe user has successfully paid onchain and is awaiting settlement. Can be considered as payment completed, but not settled completed.
session.settlingThe payment has been confirmed and is being settled. Only for cross-chain payments. Typically occurs after payment success.
session.completedThe session has been completed and the payment is settled. The funds have been received by the recipient.
session.expiredThe session has expired and the payment is not settled. The session is no longer available for payment.
session.cancelledThe session has been cancelled and the payment is not settled. The session is no longer available for payment.
session.settlement.pendingSettlement is temporarily delayed. The system is automatically retrying, and no action is required. Settlement will be completed.