A payment becomes a private repo invite.

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.

the webhook your provider sends
{
  "eventType": "checkout.completed",
  "object": {
    "order": {
      "id": "ord_6wqYhx4Us6GmkKrhQmj9y",
      "product": "prod_3Nle5C6vSYfqRnNMjGboIn",
      "amount": 2900,
      "currency": "USD",
      "status": "paid"
    },
    "customer": { "email": "buyer@example.com" }
  }
}
the collaborator it becomes
PUT /repos/acme/widget-pro/collaborators/octocat

{
  "permission": "pull",
  "invitation": {
    "id": 1782043391,
    "expired": false
  }
}

Buy a license See how it works

Four moving parts, no glue code

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.

  1. Verify

    The signature is checked against raw bytes, not a parsed body. The payload is archived before anything else touches it.

  2. Record

    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.

  3. Grant

    The buyer signs in with GitHub and is invited to what they bought. No manual invite, no shared account, no zip file.

  4. Reconcile

    Access is a desired state, so refunds, chargebacks and expiries converge the same way a purchase does. A nightly pass repairs drift.

Try it from both sides

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.

Everything in the demo — orders, accounts and repository access — is erased every hour, on the hour. Please do not put anything real into it.

Every payment provider, one contract

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.

Outside collaborators on a Free org cost nothing

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.

One price, no metering

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

Buy a license Pricing