Skip to main content
Sell access to a private GitHub repository as part of a product. After paying, the buyer connects their GitHub account and Creem invites it to the repository. When the order is refunded or charged back, or the subscription ends, Creem removes it again.
  • One-time product: the buyer keeps access until the order is fully refunded or charged back.
  • Subscription: the buyer keeps access until the subscription ends, its first payment is fully refunded, or one of its payments is charged back.

Common Use Cases

  • Boilerplates and starter kits: sell a codebase and ship updates through the same repository
  • Paid libraries and components: give customers the source instead of a zip file
  • Sponsorware and early access: let subscribers into a repository before it goes public
  • Courses and templates: keep the example code next to the lessons it belongs to

Before You Start

The repository must be private and owned by a GitHub organization. Public repositories and repositories of a personal account are listed in the product form, but can’t be selected.
  • You need to be the owner of the Creem store and an owner of the GitHub organization.
  • A GitHub organization can be connected to one Creem store at a time.
  • Each buyer is added to the repository as an outside collaborator. On a paid GitHub plan, each one can take a paid seat in your organization. If you don’t want to pay GitHub for a seat per buyer, sell from an organization on GitHub’s free plan.

Setting It Up

1

Connect your GitHub organization

In the Creem dashboard, go to Settings → Integrations and click Connect GitHub organization.GitHub asks you to install the Creem app on your organization. Choose Only select repositories and pick the repositories you want to sell. Creem only sees the repositories you pick here.GitHub then sends you back to Creem, and the organization is listed as Active.
The GitHub card in Settings, Integrations: a Connect GitHub organization button and the organization acme listed as Active, with a Disconnect button

Settings → Integrations with one connected organization

The connection link is valid for 10 minutes. If it expires, click Connect GitHub organization again.If you aren’t an owner of the organization, GitHub sends your install request to its owners. Once one of them has installed the app, connect again while signed in to GitHub as an owner.
2

Add the repository to a product

Go to Products, then create a product or open an existing one. Under Delivery, add GitHub repository access and choose:
  • GitHub account: the organization you connected
  • Repository: the private repository the buyer gets
  • Buyer role: what the buyer can do in the repository (see Buyer roles)
The Delivery section of the product form with a GitHub repository access item: GitHub account acme, repository acme/starter-kit, buyer role Read

The GitHub repository access item in the product form

To sell several repositories with one product, add GitHub repository access once per repository.
3

Save the product

Every purchase made after you save includes access to the repository.

Buyer roles

The admin role isn’t offered. To change the role, pick another Buyer role in the product form and save. The new role applies to purchases made after the change; buyers who already bought keep theirs.

What the Buyer Sees

Buyers don’t type a GitHub username. They sign in to GitHub, so access always goes to an account they control.
1

Connect GitHub after paying

The confirmation page shows a Connect GitHub to get repository access button. The receipt email has a Connect GitHub button too, which opens the customer portal.
Checkout confirmation page: Thank you for your payment, the receipt, and a Connect GitHub to get repository access button above View Order

The confirmation page of an order that includes a repository

2

Sign in to GitHub

Creem only reads which GitHub account it is. It gets no access to the buyer’s repositories.
3

Accept the invitation

GitHub sends an invitation to the repository. The buyer accepts it on GitHub, or through View invitation on the order in the customer portal.
Customer portal order card with a GitHub access section: acme/starter-kit, Invitation sent: accept it on GitHub, a View invitation link, and Connected as @octocat

The order in the customer portal while the invitation is open

4

Use the repository

Once the buyer accepts, the order shows You have access. and an Open repository link.
The button on the confirmation page works for one hour after the payment, in the browser that paid. After that, and for embedded checkouts or checkouts on a custom domain, the buyer connects GitHub from the customer portal: they sign in with the email they used for the order and open the order’s GitHub access section. Each order is connected to one GitHub account, and the buyer can’t switch it themselves. If they connected the wrong account, the store owner can reset it. If the buyer’s GitHub account already has access to the repository at the role you sell or a higher one, for example because they are a member of your organization, GitHub sends no invitation and the order shows You have access. right away. To test the invitation yourself, buy with a GitHub account that isn’t in your organization.

Invitations that expire

GitHub invitations expire after 7 days. When an invitation expires or is declined, the buyer can click Send the invitation again in the customer portal, at most once every 24 hours. The store owner can re-invite from the dashboard without waiting.

Managing Access in the Dashboard

Open a payment in Payments, or a customer in Customers. The details panel has a GitHub access section with one entry per repository: the buyer role they bought, the buyer’s GitHub account and user ID, when they were invited and accepted, and when and why access was removed.
GitHub access section in the dashboard: acme/starter-kit, status Active, buyer role Read, GitHub account octocat, GitHub user ID, invited and accepted dates, and Revoke access and Reset GitHub account buttons

The GitHub access section of a payment

An accepted invitation shows as Active within about 15 minutes. The store owner can also act on an order from this section:
  • Re-invite on an entry that is Invite expired or Failed. GitHub sends the new invitation within a few minutes.
  • Revoke access removes the buyer from every repository of the order. It doesn’t refund the order, and access isn’t restored automatically, not even if the subscription is reactivated.
  • Reset GitHub account removes the connected account from every repository of the order. The buyer then connects a new account from their order in the customer portal. Creem doesn’t email the buyer about the reset, so let them know.

When Access Ends

Creem removes the buyer from the repository, or cancels their pending invitation, in these cases: Removal usually takes a few minutes.
Removing a buyer from the repository doesn’t remove the copies they already cloned. Treat a one-time sale of repository access like a file download when you decide your refund policy.
  • Access isn’t restored automatically. To give it back, for example after you win a dispute or a subscriber pays again, add the buyer to the repository on GitHub yourself.
  • Removal applies to the GitHub account, not to the order. If the same GitHub account bought access to the same repository twice, ending one order’s access removes the account from the repository, while the other order’s entry still shows Active.
  • Existing collaborators are removed too. If the buyer was already a collaborator on the repository before they bought it, they lose that access when the order’s access ends. Members of your organization keep the access they have through the organization or a team.

Limits

  • 50 invitations per repository per 24 hours. This is GitHub’s limit. Creem retries invitations above it later. If an entry ends up Failed, click Re-invite once 24 hours have passed.
  • One GitHub account per order.
  • Organization-owned private repositories only. On a personal account’s repository, GitHub gives every collaborator write access, so those repositories can’t be sold.

Disconnecting GitHub

In Settings → Integrations, the store owner can click Disconnect next to an organization.
  • Disconnecting in Creem removes the organization from Creem, so its repositories can’t be picked for a product anymore. It doesn’t stop sales: products that already sell its repositories keep giving new buyers access, even though the product form shows them as stopped working. To stop selling a repository, remove GitHub repository access from those products. The Creem app stays installed on GitHub, so buyers who already have access keep it, and Creem can still remove them after a refund, a chargeback or the end of a subscription. You can connect the organization again later.
  • Uninstalling the Creem app on GitHub means Creem can no longer invite or remove anyone. Buyers who have access keep it until you remove them in the repository’s settings, and new buyers don’t get access. Remove GitHub repository access from your products before you uninstall.
  • Removing a repository from the Creem app on GitHub breaks the products that sell it: new buyers get no access to it, and the product form shows that the repository stopped working. To fix it, add the repository back to the Creem app on GitHub, or choose another repository.

Troubleshooting

Creem only sees the repositories you selected when you installed the Creem app. Open the app’s settings in your GitHub organization, add the repository, then reload the product form. Repositories that are public or belong to a personal account are listed but can’t be selected.
Connect again while signed in to GitHub as an owner of the organization. If your organization uses single sign-on, sign in to it on GitHub first. If the organization was connected to another Creem store, disconnect it there, uninstall the Creem app in the organization’s settings on GitHub, then connect again from this store.
Check the GitHub access section of the payment. Awaiting GitHub account means the buyer hasn’t connected GitHub yet: send them to the customer portal. Invite pending for more than a few minutes means GitHub’s daily invitation limit was reached or GitHub returned an error, and Creem is retrying. Invited means GitHub sent it: the buyer finds it in their GitHub notifications, in the email from GitHub, or through View invitation in the customer portal.
Click Reset GitHub account in the GitHub access section of the payment, then tell the buyer to connect the right account from their order in the customer portal.
The panel shows why. If the Creem app can no longer reach the repository, check that the app is still installed and that the repository is still selected, then click Re-invite.
Creem couldn’t remove the buyer, usually because the Creem app was uninstalled or can no longer reach the repository. Remove the buyer in the repository’s settings on GitHub.

Customer Portal

Where buyers connect GitHub and follow their invitation

File Downloads

Deliver files instead of a repository