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": 6900,
      "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

The automated checkout is still being wired up — on pay2clone itself, of course. Until it is, the button opens an email and we invoice you directly.

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 provider posts to your Worker. The signature is checked against bytes, not a parsed body, and the raw payload is archived before anything else happens.

  2. Record

    The event and the work it implies are written in one transaction. Replay the same event ten times and you still get one order — the idempotency key is the provider event id.

  3. Grant

    The buyer signs in with GitHub and is invited to the repositories their purchase entitles them to. No manual invite, no shared account, no zip file.

  4. Reconcile

    Access is a desired state, not a one-off action. Refunds, chargebacks and expiries converge the same way a purchase does, and a nightly pass repairs drift.

Four payment providers, 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 all three docs pages we checked were 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.

$69 one-time

Buy a license Pricing