BountyPay

reading settings
font:
size:
spacing:

Pays open-source bounty contributors through PayPal once Claude confirms the merged PR really resolves the issue. Claude advises, code enforces the limits, and a maintainer reviews everything else.

BountyPay
the mandate code enforces, whatever Claude says
80% / $100
confidence on a PR that told Claude to approve itself
2%
payout per bounty, however often a webhook retries
1

The problem

Bounties are a good way to get help on open-source projects, but paying them is slow manual work. You read every merged PR, decide whether it really fixed the issue, look up the contributor's payment details, send the money and keep a record, and contributors wait weeks.

What changed

  • Settled bounties on their own within a limit a human can read in one line. A real fix was paid automatically at 92% confidence, and a typo-only "fix" was held at 2%.
  • Held a PR that hid instructions to approve itself in its description, a fake diff block and a code comment. Claude scored it 2% and its reasoning named the manipulation.
  • Made double payment impossible. Every state change is a compare-and-swap, and the PayPal batch ID comes from the claim, so PayPal itself refuses a second payout.

What I worked on

  • I built it solo for a hackathon, with Claude (claude-opus-5-5) judging each merged PR through structured outputs, PayPal sandbox Payouts and verified webhooks, and an AG Grid dashboard for maintainers.
  • I modelled the bounty lifecycle as a typed state machine with one transition table, and covered it with 38 automated tests and a scripted end-to-end check in a real browser.

A maintainer labels an issue bounty:50. A contributor opens a PR that says Fixes #12 and PayPal: [email protected]. When the PR is merged, Claude reads the issue, the PR and the diff, and returns a structured verdict: pay or hold, a confidence score, and reasoning a maintainer can check. If Claude is at least 80% confident and the bounty is $100 or less, BountyPay pays the contributor through PayPal Payouts and comments a receipt on the PR. Everything else waits in a dashboard for a maintainer to approve or reject.

Claude advises, code decides

I wanted the settlement step to run on its own without handing my judgement, or my money, to a black box. So Claude never moves money. It returns a verdict, and plain code checks that verdict against the mandate. A refusal or an error holds the bounty.

Untrusted PR text goes inside tags with a random suffix for each request, and payment details are removed before Claude judges anything. PR #15 in the demo hides instructions to approve itself in its description, a fake </diff> block and a code comment. Claude ignores them and the bounty is held at 2%.

Detail panel for PR #15: held at 2% confidence, with Claude's reasoning flagging the prompt injection
The prompt-injection attempt, held at 2%. Claude's reasoning names the manipulation.

Webhooks get redelivered, people double-click, and processes crash between "PayPal accepted it" and "we saved it". There is one row per bounty issue and every state change is a compare-and-swap, so the webhook and the dashboard can never both pay. The PayPal sender_batch_id is derived from the claim, so a retry finds the original payout instead of sending a second one. I tested that against PayPal's real duplicate-batch response, which is how I found that PayPal puts the original batch link somewhere I didn't expect.

"Paid out" only counts money PayPal confirms. Payout status comes from PayPal's verified webhooks, with a status lookup as a fallback, and the dashboard shows which one confirmed each payout.

Detail panel for PR #10: Claude is 92% sure, paid automatically, PayPal status Succeeded
A real fix, paid automatically at 92% and confirmed by PayPal.

The dashboard

Maintainers work from an AG Grid dashboard: a quick filter, state chips and column filters, a pinned totals row, cells that flash when a bounty changes state, and CSV export. Clicking a row opens Claude's full reasoning in a keyboard-navigable side panel, and Approve and Reject ask for confirmation before any money moves.

Why the merchant account is in the UK

I built BountyPay in Nigeria. PayPal denied every payout from my Nigeria-registered sandbox business account, even though it was verified and held USD 5,000, so the demo uses UK sandbox accounts. Paying contributors in send-only markets like Nigeria is the next problem BountyPay needs to solve.

How it's built

Next.js 16 and TypeScript on Node 24, with SQLite through node:sqlite. GitHub webhooks are HMAC-verified, and the live demo on Render refills itself with demo bounties when its database is empty. An offline mode swaps in stand-ins for Claude and PayPal, so anyone can run it with no keys.