在应用程序中使用 GitHub Marketplace API
了解如何将 GitHub Marketplace API 和 web 挂钩集成到用于 GitHub Marketplace 的应用程序中。
GitHub Marketplace API 的 REST 端点
要帮助管理 GitHub Marketplace 上的应用程序,请使用这些 GitHub Marketplace API 端点。
GitHub Marketplace API 的 web 挂钩事件
GitHub Marketplace app 从 Marketplace 购买事件 web 挂钩接收有关用户计划更改的信息。 当用户购买、取消或更改其付款计划时,就会触发 Marketplace 购买事件。
测试应用程序
您可以使用 GitHub Marketplace 上架草稿来模拟每个帐单流程。 上架信息处于草稿状态意味着它尚未提交以供审批。
Handling new purchases and free trials
When a customer purchases a paid plan, free trial, or the free version of your GitHub Marketplace app, you'll receive the
marketplace_purchase
event webhook with thepurchased
action, which kicks off the purchasing flow.Handling plan changes
Upgrading or downgrading a GitHub Marketplace app triggers the
marketplace_purchase
event webhook with thechanged
action, which kicks off the upgrade or downgrade flow.Handling plan cancellations
Cancelling a GitHub Marketplace app triggers the
marketplace_purchase
event webhook with thecancelled
action, which kicks off the cancellation flow.