HonorBox

Deliver digital products through GitHub: the practical guide

If your buyers have GitHub accounts, a private repo is a delivery channel with properties no download link has: per-buyer access control, revocation, updates that arrive as git pull, and zero hosting to run. This guide covers doing it well. Useful with or without our tooling; the one section selling something is marked.

The private-repo delivery model

Put the product in a private repository. Delivery = inviting the buyer's GitHub account as a read-only collaborator. That single move gives you:

It works for anything whose buyers are comfortable on GitHub: code and CLI tools, templates and boilerplates, agent packs, technical courses, design systems, an OSS project's sponsorware.

What it costs you

Wiring GitHub delivery to Stripe checkout

Collect the username as a custom field on your Stripe Payment Link (or checkout form). After payment you have a checkout.session carrying the username; something must read it and send the invite:

  1. Webhook + server. Instant, classic, and you now operate an endpoint.
  2. Scheduled poll from CI (the marked section: this is what our MIT-licensed HonorBox engine does). A GitHub Action lists recent paid sessions and invites each buyer. No server, no webhook secret, delivery in minutes. The engine is 844 dependency-free lines you can read before trusting: a 392-line driver on a 452-line pure core.
  3. By hand. Works for the first sales; does not survive a weekend away.

Whichever you pick: make fulfillment idempotent (track processed session ids, because polls overlap, webhooks retry, and double-inviting is harmless only if you built it that way), and set the delivery expectation at checkout ("usually within minutes, always within a few hours") so minute-4 support emails don't happen.

Revocation discipline

Decide the refund flow before the first refund: refund issued → collaborator removed → pending invitation cancelled. If you sell several products, scope revocation to the repos that purchase granted: a buyer refunding product B must keep product A. Automate it; refund-fraud babysitting doesn't scale.