Skip to main content
We publish frequent updates to our documentation, and translation of this page may still be in progress. For the most current information, please visit the English documentation.

Configuring a webhook to notify you of plan changes

After creating a draft GitHub Marketplace listing, you can configure a webhook that notifies you when changes to customer account plans occur. After you configure the webhook, you can handle the marketplace_purchase event types in your app.

The GitHub Marketplace event webhook can only be set up from your application's GitHub Marketplace listing page. You can configure all other events from your application's developer settings page. If you haven't created a GitHub Marketplace listing, read "Drafting a listing for your app" to learn how.

Creating a webhook

To create a webhook for your GitHub Marketplace listing, click Webhook in the left sidebar of your GitHub Marketplace listing page. You'll see the following webhook configuration options needed to configure your webhook:

Payload URL

Die Payload-URL ist die URL des Servers, der die Webhook-POST-Anforderungen empfängt.

Content type

Webhooks können mithilfe unterschiedlicher Inhaltstypen übermittelt werden:

  • Der Inhaltstyp application/json bietet die JSON-Nutzdaten direkt als Text der POST-Anforderung.
  • Der Inhaltstyp application/x-www-form-urlencoded sendet die JSON-Nutzdaten als Formularparameter namens payload.

Wähle die Einstellung aus, die deinen Anforderungen entspricht. GitHub recommends using the application/json content type.

Secret

Durch das Festlegen eines Webhookgeheimnisses kannst du sicherstellen, dass an die Nutzlast-URL gesendete POST-Anforderungen von GitHub kommen. Wenn du einen geheimen Schlüssel festlegst, erhältst du die Header X-Hub-Signature und X-Hub-Signature-256 in der Webhook-POST-Anforderung. Weitere Informationen dazu, wie du einen geheimen Schlüssel mit einem Signaturheader verwendest, um deine Webhooknutzlasten zu sichern, findest du unter Sichern deiner Webhooks.

Active

By default, webhook deliveries are "Active." You can choose to disable the delivery of webhook payloads during development by deselecting "Active." If you've disabled webhook deliveries, you will need to select "Active" before you submit your app for review.

Viewing webhook deliveries

Once you've configured your GitHub Marketplace webhook, you'll be able to inspect POST request payloads from the Webhook page of your application's GitHub Marketplace listing. GitHub doesn't resend failed delivery attempts. Ensure your app can receive all webhook payloads sent by GitHub.

Screenshot of the recent webhook deliveries for the GitHub Marketplace listing.