pull, push, triage, maintain, or admin). Dodo Payments sends the collaborator invitation and removes the collaborator when the grant is revoked.What Gets Delivered
- The customer connects their GitHub account from the Customer Portal. This links their GitHub account to the purchase.
- Dodo Payments invites that account to your repository at the configured permission level. The customer gets access after they accept the invitation on GitHub. If the customer owns the repository, no invitation is needed.
- Cancellation, refund, or a manual revoke removes the collaborator and cancels any pending invitation.
Connect GitHub
Open Entitlements
Pick GitHub

Connect GitHub prompt before the install handoff.

GitHub Install & Authorize page. Choose which repositories the app can manage.

Account connected. Return to the Dodo Payments dashboard to continue.
Pick a Repository and Permission

Creating a GitHub entitlement. Pick the repository and the permission you want customers to receive.
Attach It to a Product
Permission Levels
The entitlement uses GitHub’s standard repository permissions:Customer Flow
- 顧客がチェックアウトを完了します。
- Dodo Payments は
Pendingステータスで grant を作成します。Dodo Payments は直ちに GitHub authorization URL の作成を試み、oauth_urlに保存します。失敗した場合、顧客が accept flow を開始するまでoauth_urlはnullのままです。 - payment confirmation email には entitlement が Action Required として表示され、Customer Portal へのリンクが含まれます。ポータルで顧客が Connect をクリックし、GitHub で認証します。authorization link の有効期限は 30 分で、顧客が戻ってくると Customer Portal が新しいリンクを生成します。
- Dodo Payments は、設定された permission で顧客の GitHub アカウントを repository に招待します。invitation が作成されると、grant は
Deliveredに移行します。GitHub が invitation を拒否した場合、grant は提供されません。 - subscription がキャンセルされた場合、payment が返金された場合、または grant が取り消された場合、Dodo Payments は顧客を collaborator から削除し、保留中の invitation をキャンセルします。
Required Configuration
Create via API
Webhooks
The standardentitlement_grant.* webhook events cover the GitHub flow:
entitlement_grant.createdはstatus: "Pending"とともに発火します。oauth_urlには、すでに GitHub authorization URL が格納されている場合があります。nullの場合、顧客が Customer Portal から accept flow を開始すると値が設定されます。entitlement_grant.deliveredは、collaborator invitation が作成されると発火します。entitlement_grant.revokedは、access が取り消されたときに発火します。GitHub App をアンインストールすると、Dodo Payments はrevocation_reason: platform_externalを使用して、その installation に関連する保留中および提供済みの grant を取り消します。- Dodo Payments が顧客を repository に追加できない場合(たとえば、GitHub App が repository への access を失った場合)、
entitlement_grant.failedはerror_code: "GRANT_ACCESS_FAILED"とともに発火します。
Troubleshooting
Repository picker is empty
Repository picker is empty
Grant fails with a permission error
Grant fails with a permission error
Customer hasn't accepted the invite
Customer hasn't accepted the invite
Delivered in Dodo Payments, because the invitation is what Dodo Payments issues.