The problem
PayPal's Orders v2 schema warns that an order can be COMPLETED while its capture is DECLINED. A freelancer looking only at the order status could deliver work before the payment clears.
What Capture Desk does
Capture Desk checks the capture, not just the order. A declined capture keeps the work locked; only a COMPLETED capture marks it safe to fulfill. For eight mapped PayPal response codes, the desk supplies the buyer message. For 9500, 9520 and 5180, it says not to retry that card.
On a decline, Gemma reads the response code, a private buyer note, attempt history and the WIB clock. It proposes retrying later, sending a new checkout link or stopping. Deterministic guards can veto unsafe moves; on suspected-fraud codes only stopping is offered. At most three attempts are allowed. A freelancer approves before the next sandbox checkout runs. The sandbox deliberately skips the suggested wait.
How it was built
The app calls the PayPal sandbox Orders v2 API directly. Its browser page, Node.js CLI and our own local MCP server share one guard module and SQLite ledger. Each attempt has a fixed PayPal request ID, so repeat calls replay the attempt instead of creating another order. The desk stores checkout and subsequent read claims so it can display disagreements instead of overwriting them. It does not use PayPal's hosted MCP, refunds, payouts or webhooks.
Challenges and learning
The hard part was giving a model useful judgment without letting it decide whether money arrived. Code owns the file-lock decision, buyer lines, attempt cap and vetoes. In a 29-case evaluation, Gemma passed 26 and a code-only baseline passed 25. On eight note-driven cases Gemma passed five and the baseline four; three of those five are now decided by the fraud guard, and a fourth also passes the baseline. These are small written-case samples, not a production error rate. Three repeats of the eight note cases had the same five passes and three failures.
Capture Desk was started during the hackathon submission period. The demo uses real sandbox recordings, scripted CLI calls with filtered output and a reconstructed MCP response, labeled on screen; narration is generated. This is a sandbox proof of concept, not live file delivery or a production payment service.
Run it
The public repository contains setup instructions for Node 22.13+, a PayPal US sandbox merchant app and a Gemini API key. Judges can run the page locally or use the CLI and MCP server.
Log in or sign up for Devpost to join the conversation.