Installation Behavior With Insufficient Marketplace Plan


So I’ve noticed a lot of GitHub Apps in Marketplace having plans around private repositories and the like, and in thinking about how I would implement something similar, I came across a question of expected behavior.

If I have setup my plans to be based on private repositories (as an example), and a user uses the GitHub App Installation UI to install my App on a private repository - what should an App being doing as a “best practice” if that user hasn’t bought the appropriate plan?

Should I be having the app un-install itself when it receives the installation webhook event? If so, how do I tell the user that the action they just took was undone, and how do I tell the user what they need to do to install successfully?


what should an App being doing as a “best practice” if that user hasn’t bought the appropriate plan?

I think the best thing to do would be to contact the user and explain that they might not receive their expected functionality and advise that they edit their plan to the appropriate tier. Currently, purchasing a Marketplace plan and installing the underlying app are fairly decoupled experiences on our side, but we do hope to more closely couple them to allow us to do more advanced things like catching situations like this on our side.


That is good to know - I look forward to any improvements in this area, as even contacting the user might be tricky - when receiving an event, we aren’t “signed in” as the user - so even if our app asks for permission to see a user’s email, unless they made it public we have no way to directly contact them.

Thanks for the clarification on the current state of affairs in this area!


@romeara, the marketplace_purchase webhook event should include the email of the installer (as sender) regardless of the permissions you have. Further the webhooks and API event payloads include the organization_billing_email for organization relevant purchases. Both of these things are designed to ensure you are always able to contact someone about a Marketplace purchase.