Inspiration
A procurement manager can outsource invoice reconciliation, but paying before delivery makes it hard to tie the service fee to an agreed result. Work may also change hands midway through a task. Purser gives the buyer a record of the agreed deliverable, the worker authorized to submit it, and the report the payment belongs to.
What it does
The buyer approves an acceptance card that fixes the source inputs, deliverable and USD 1.00 reconciliation service fee, then authorizes that fee in PayPal Sandbox. A local Qwen model extracts invoice facts and cites source lines. Independent code checks those citations and recalculates the discrepancies. A replacement worker can resume saved evidence, and Purser refuses submissions from the old worker. Only the buyer's settlement path can capture the authorized fee after report acceptance.
How we built it
Python and SQLite persist the contract, checkpoints, worker permissions, approved report and payment intent. Qwen3 runs locally through MLX LM. Orders v2 handles buyer approval and authorization. Payments v2 handles capture, readback and void. If capture is uncertain, Purser freezes the payment and checks the original provider records before proceeding.
Verified results
On synthetic invoices, Qwen produced evidence for an $8.00 discrepancy, a duplicate invoice and a missing purchase order. Worker B resumed from A's checkpoint. The stale submission and unauthorized capture attempt were both refused. On an accepted order, PayPal Sandbox completed a $1.00 capture. We stopped the settlement process after the provider response and before saving the local receipt. A fresh process found the original capture using only provider reads, and the order listed exactly one capture. On a separate rejected order, PayPal confirmed the authorization was voided with zero captures.
Prior work and new development
Earlier Purser work established the idea of checkpointed worker handoff. Pay on Acceptance is a fresh implementation for this event, including the acceptance card, local model extraction, evidence verifier, limited worker permissions, PayPal adapter, settlement recovery and browser workbench.
How to try it
Follow the repository README for a local fixture replay and model setup, then use SANDBOX.md to run with your own PayPal Sandbox seller and buyer.