A GitHub Marketplace app receives information about changes to a user's plan from the Marketplace purchase event webhook. A Marketplace purchase event is triggered when a user purchases, cancels, or changes their payment plan.
GitHub recommends testing your app with APIs and webhooks before submitting your listing to GitHub Marketplace so you can provide an ideal experience for customers. Before an onboarding expert approves your app, it must adequately handle the billing flows.
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 the purchased action, which kicks off the purchasing flow.