Pay2Clone listens for the payment, resolves who bought what, and adds the buyer as a collaborator on your private GitHub repository. When the entitlement lapses, it removes them. Self-hosted on Cloudflare, one deployment for every repo you sell.
{
"eventType": "checkout.completed",
"object": {
"order": {
"id": "ord_6wqYhx4Us6GmkKrhQmj9y",
"product": "prod_3Nle5C6vSYfqRnNMjGboIn",
"amount": 2900,
"currency": "USD",
"status": "paid"
},
"customer": { "email": "buyer@example.com" }
}
}
PUT /repos/acme/widget-pro/collaborators/octocat
{
"permission": "pull",
"invitation": {
"id": 1782043391,
"expired": false
}
}
Each step is durable on its own: a lost webhook is replayed, a failed GitHub call is retried, and a daily pass reconciles what GitHub actually shows against what your database says it should.
The signature is checked against raw bytes, not a parsed body. The payload is archived before anything else touches it.
The event and the work it implies land in one transaction, keyed on the provider’s event id. Replay it ten times and you still get one order.
The buyer signs in with GitHub and is invited to what they bought. No manual invite, no shared account, no zip file.
Access is a desired state, so refunds, chargebacks and expiries converge the same way a purchase does. A nightly pass repairs drift.
This site is itself a deployment. The same Worker that serves this page runs a live demo you can walk through as the customer and then inspect as the operator — a real test payment, a real webhook, a real invitation to a real private repository.
/app
Orders, entitlements, price mappings, the reconcile log — the operator’s whole side of the product. The demo account and its password are printed on the sign-in page, so there is nothing to request and nothing to sign up for.
Open the dashboard/me
What your customer sees. Connect your own GitHub account, pay with the test card printed there — no money moves — and take the invitation that arrives.
Open the buyer pageEverything in the demo — orders, accounts and repository access — is erased every hour, on the hour. Please do not put anything real into it.
Each adapter was written against real captured payloads or the vendor SDK, not from a documentation page. Their event lists come from the running product, because every docs page we checked was wrong.
Verified against the official SDK signer
Verified against a real signed event
Verified against a real signed event
Verified against a real signed event
Verified against the official SDK signer
Most people assume private-repo collaborators are billed per seat. On a GitHub Free organization they are not. Selling to a hundred buyers costs the same as selling to one.
| GitHub plan | Private repos | Outside collaborators | Per collaborator |
|---|---|---|---|
| Free organization | Unlimited | Unlimited | $0 |
| Team organization | Unlimited | Unlimited | $4/month |
Checked against GitHub’s published plan limits. Team is listed for contrast: you do not need it to sell repository access.
Buy once, deploy it as many times as you like, for as many repositories as you like. Your buyers never see a Pay2Clone account — they see your repository.
$29 one-time