The problem

PayPal is the biggest payment platform on the internet. It processed $1.79 trillion in 2025 across 439 million active accounts (PayPal FY2025 results), and industry estimates put it at about 43% of global online payment processing versus Stripe's 21 to 29% (Red Stag, 2025). Yet developers keep calling Stripe the easier one to build on. A big reason is a single tool.

Stripe has a CLI. PayPal does not. With stripe listen and stripe trigger, a Stripe developer gets real webhook events on localhost in one command. A PayPal developer gets:

  • a webhook simulator that sends mock events matching no real transaction, which cannot be resent;
  • sandbox webhooks that arrive late or not at all (in our own testing, 3 of 7 real card captures never produced a recorded PAYMENT.CAPTURE.COMPLETED);
  • disputes that take 30+ minutes to move through the sandbox, so nobody tests the dispute path before production.

So webhook bugs ship. No signature check, orders fulfilled twice on redelivery, handlers that crash on a dispute. They surface only when real money moves, and disputes are expensive: every $1 of fraud costs US merchants $4.61 once chargebacks, fees and replaced goods are counted (LexisNexis True Cost of Fraud 2025).

What paydrill is

paydrill is the Stripe CLI for PayPal, plus the half the Stripe CLI never built: it tells you why your handler broke and fixes it.

Stripe's CLI stops at "here is the event." paydrill keeps going:

  1. Bring real PayPal sandbox events to localhost. Real payments, refunds and chargebacks, tunneled to your app, signatures checked at the relay, missed deliveries backfilled from PayPal's events API.
  2. Behave like production. Replay events the way PayPal really sends them: duplicated, out of order, forged and unsigned, unknown types.
  3. Show exactly what breaks. A drill sends a scenario and grades it on real HTTP answers and the business effects your app recorded.
  4. Explain and fix with Claude. Claude points to the file and line, writes the patch on a new branch, and paydrill proves it by running the drill again.

Why we built it

Anyone who has wired up PayPal webhooks has lost hours to a 500 with no idea which payload field caused it. The PayPal AI Hackathon asked how AI can make PayPal better for the people who build on it. Our answer: close the gap with Stripe at the exact point where developers choose between them, the first afternoon of integration, then go past Stripe with AI that does the debugging.

Features

Stripe CLI PayPal today paydrill
Real events on localhost yes no yes (listen, cloudflared or your own HTTPS URL)
Trigger real test events yes mock simulator only yes: payment, full and partial refund, chargeback, dispute
Recover dropped deliveries n/a no yes, backfill from the events API, never double delivered
Chaos replay (dupes, reorder, forged, unknown) no no yes
Explain a failure to file and line no no yes, Claude
Write and verify the fix no no yes, new branch plus rerun
Rehearse a full dispute with AI-written evidence no no yes, notes plus a PDF timeline, from order facts only
Payment coverage report and badge no no yes
Types and zod validators from real events no no yes, with payload drift detection
Migrate a Stripe app to PayPal n/a no yes, codemods plus AI glue plus an honest report
AI shopping-agent readiness test no no yes, Playwright drives a real browser
CI, editor and agent integration partial no GitHub Action PR comment, MCP server, Claude Code plugin

Plus: an Ink terminal UI and a browser inspector, paydrill ask ("refund my last payment and open a dispute" becomes previewed sandbox calls you confirm), and scenarios written in YAML or drafted from plain English.

How we built it

PayPal sandbox (Orders, Payments, Disputes, Webhooks, Events APIs)
        |  real webhooks                 ^  real sandbox calls
        v                                |
  cloudflared tunnel  -->  paydrill relay  <--  trigger / scenarios / rehearse
                          (signature check, backfill, routes, chaos)
                                  |  forward
                                  v
                       your app on localhost  -->  HTTP status + /_effects
                                                          |
                                                          v
                                        drill (pass/fail from HTTP only)
                                                          |
                                Claude: explain -> fix on a branch -> rerun drill
                                                          |
                              PR comment / GitHub Action / MCP / Claude Code plugin
  • TypeScript on Node 22. Ink and React for the terminal UI, Playwright for the shopping agent, the MCP SDK for editor and agent access.
  • PayPal APIs: Orders v2 with a card payment source (so tests need no buyer click), Payments refunds, the sandbox chargeback endpoint, Disputes (accept claim, provide evidence, adjudicate), and Webhooks (CRUD, signature verification, event list and resend, simulator).
  • Claude (claude-opus-5-5) with structured outputs validated by zod for explanations, patches, dispute evidence, migration glue and shopping decisions. It runs on an Anthropic key or a signed-in Claude Code plan.
  • AG Grid Community powers the interactive demo's event explorer: search, sort and select a recorded delivery to inspect its signature, status and latency. Render builds and hosts that demo straight from GitHub, so judges can try it with no keys.
  • The one rule: Claude never decides pass or fail. Verdicts come from real HTTP answers and recorded business effects. Every event is labeled live, backfilled, simulated by PayPal, replayed or chaos, so a report never passes off a mock as real money movement.

Impact

  • For developers: the first-day PayPal workflow goes from "configure a webhook in the dashboard, deploy somewhere public, click the simulator, hope" to one command, and the dispute path gets tested before production instead of after the first chargeback.
  • For PayPal: the tool Stripe developers expect now exists for PayPal, and paydrill migrate turns a Stripe integration into a PayPal branch with an honest report of what was verified. That lowers the cost of choosing PayPal at the moment developers decide.
  • For merchants: bugs that cost real money (double fulfilment, unsigned events accepted, disputes ignored) get caught on localhost.

What we proved on the real sandbox

  • Live delivery. A real $12 sandbox capture arrived as a signed webhook and the demo shop answered HTTP 200 in 24 ms.
  • The drill catches real bugs. Our demo shop has four planted webhook bugs. A drill against real sandbox events caught three of the four: an unsigned forged payment accepted with a 200, a redelivered event fulfilled twice, a dispute handler that crashed.
  • Claude found the line. It traced the dispute crash to resource.amount where PayPal sends resource.dispute_amount, and wrote the patch on its own branch.
  • A full dispute, end to end. One real sandbox chargeback walked through every stage (opened, evidence due, evidence submitted, under review, resolved) with the handler checked at each, ending RESOLVED_WITH_PAYOUT. The sandbox takes about 4 minutes to ask for evidence and 17 to 21 more to allow a ruling, so paydrill disputes prepare ages disputes ahead of time.
  • Agent readiness. The clean shop scored 80/100 and the AI shopper reached PayPal approval. The blocked version scored 20/100.
  • Tests: the CLI builds, type-checks and passes 43 tests.

Not yet verified, and labeled that way in the tool: Stripe-to-PayPal parity runs and the credentialed GitHub Action run.

Challenges

The PayPal sandbox is not a fast or reliable mirror of production. Deliveries arrive late or not at all, retries look like new events, chargebacks always send CUSTOMER.DISPUTE.UPDATED but only sometimes CREATED, and disputes move on their own schedule. We built backfill with deduplication, a per-process webhook ledger so parallel runs do not delete each other's webhooks, and the dispute pool so a real dispute can resolve on camera.

What's next

Run migration parity with both test providers, extend it from webhook effects to checkout and refund endpoints, and publish to npm so npx paydrill listen is the whole setup.

Try it

Built by Tijil Chhabra and Laksh Goyal.

Built With

Share this project:

Updates

Submission history