Documentation Index
Fetch the complete documentation index at: https://docs.dodopayments.com/llms.txt
Use this file to discover all available pages before exploring further.
The GitHub entitlement adds a paying customer as a collaborator on a private repository. You choose the permission level (
pull, push, triage, maintain, or admin) and Dodo Payments handles invitation, acceptance tracking, and removal on cancellation.What gets delivered
- The customer is invited to your GitHub repository through an OAuth flow that links their GitHub account to the purchase.
- Once they accept, GitHub grants them collaborator access at the configured permission level.
- Cancellation, refund, or manual revoke removes the collaborator.
Connect GitHub
Open Entitlements
In your Dodo Payments dashboard, go to Entitlements and click + to start a new entitlement.
Pick GitHub
Choose GitHub Access as the integration. If GitHub is not yet connected, you’ll be prompted to Connect GitHub.
Clicking through opens GitHub in a new tab. Sign in, then install the Dodo Payments GitHub App on the organization or user account that owns the repository. You can grant access to all repositories or only the ones you intend to gate.
When GitHub redirects back, you’ll see a confirmation that the account is connected.



Pick a repository and permission
Back in the dashboard, choose the repository the entitlement should grant access to and pick the permission level. The repository picker only shows repositories the GitHub App has access to. Give the entitlement a name and click Create Entitlement.

Permission levels
GitHub’s standard repository permissions apply:| Permission | Best for |
|---|---|
pull | Read-only access. Customers can clone, fetch, and view the repo. |
triage | Read access plus the ability to manage issues and pull requests. |
push | Read + write access. Customers can push branches and open pull requests. |
maintain | Push access plus management of repository settings (excluding sensitive ones). |
admin | Full control of the repository. Use with caution. |
Customer flow
- The customer completes checkout.
- Dodo Payments creates a grant in
pendingstatus with anoauth_urlfor the customer to link their GitHub account. - The customer authorizes through the link in their email or customer portal.
- Dodo Payments invites the customer’s GitHub account to the repository at the configured permission. The grant moves to
deliveredonce the invitation is created. - If the subscription is cancelled, refunded, or revoked, the customer is removed as a collaborator.
Required configuration
| Field | Required | Description |
|---|---|---|
target_id | Yes | The repository to invite the customer to. The dashboard’s repository picker fills this in for you. |
permission | Yes | One of pull, push, triage, maintain, admin. |
Create via API
Webhooks
The standardentitlement_grant.* webhook events cover the GitHub flow:
entitlement_grant.createdincludes theoauth_urlfor GitHub authorization.entitlement_grant.deliveredfires once the collaborator invitation is created.entitlement_grant.failedfires witherror_code: "github_permission_denied"(or similar) if the GitHub App lost access to the repository.
Troubleshooting
Repository picker is empty
Repository picker is empty
The Dodo Payments GitHub App must be installed on the org or user that owns the repository. Open Entitlements → Integrations → GitHub and reinstall the app, making sure to grant access to the relevant repositories.
Grant fails with permission_denied
Grant fails with permission_denied
The GitHub App’s installation no longer has access to the repository, or the repository was renamed/transferred. Re-grant access to the app and the next regrant will succeed.
Customer hasn't accepted the invite
Customer hasn't accepted the invite
Customers must accept the GitHub invitation from their notifications page or by clicking the link in their email. Until they accept, they remain “invited” but cannot clone the repo. The grant is still
delivered from Dodo Payments’ perspective; the invitation is what we issue.