Testing apps, APIs, and webhooks
GitHub recommends testing your app with APIs and webhooks before publishing the listing for your app in the Marketplace so you can provide an ideal experience for customers.
To set up a test GitHub Marketplace application, you can create a new draft Marketplace listing for any OAuth or GitHub App. You can then use that app to test the Marketplace webhooks and API. A draft Marketplace listing and its published plans are only visible to the app owner. Any purchases made using the draft Marketplace listing will NOT create real transactions and GitHub will not charge your credit card.
Please do not make test purchases with your production app once it has launched in Marketplace.
Using development apps to test changes
We recommend creating separate development or staging apps for testing changes rather than using a production app. To set up a test GitHub Marketplace application, you can create a new draft Marketplace listing for your test OAuth or GitHub App, and then test it with the Marketplace webhooks and API.
Simulating Marketplace purchase events
Various testing scenarios require setting up listing plans that offer trials, and switching between free and paid subscriptions. Because downgrades and cancellations don't take effect until the next billing cycle, GitHub provides a developer-only feature to "Apply Pending Change" so the changing and cancelling plan actions takes effect immediately. You can access Apply Pending Change for apps with draft Marketplace listings in https://github.com/settings/billing:
For most endpoints, we provide stubbed API endpoints that return hard-coded data for testing. You must specify the stubbed URLs to receive stubbed data, which you can see in the
/marketplace_listing/stubbed portion of the URL. Please use the documentation for endpoints that support this stubbed-data approach. For more information, see GitHub Marketplace endpoints.
GitHub provides tools for testing your deployed payloads. For more information, see Testing webhooks.