What it does ProcurePilot is an agentic-commerce demo: you tell the agent what to buy, and it handles the purchase end to end. It creates a PayPal order, the buyer approves it, the payment is captured, and the seller is paid out — the agent drives the whole flow and PayPal handles the money.
How we built it Node.js, PayPal REST APIs (Orders v2 for the order/approve/capture flow, Payouts for paying the seller), OpenAI for the agent. Everything verified live against the PayPal sandbox.
What is verified live (sandbox)
- Payout: batch MVKLK2ERH5MVN, status SUCCESS, transaction 3W948184LS8575725.
- Order 51D55077F4499311P ($0.01 USD) approved by the sandbox buyer; capture verified COMPLETED, capture ID 8E845867D94877050, payee confirmed.
- Tests 16/16; independent review clean.
- Earlier order 42F56272CR221100C turned out to be dead (404) — replaced by the fresh order above.
Challenges we ran into The first approval link died because the original order no longer existed on PayPal's side (404). The fix was a fresh order and a new approval link. The sandbox approval page itself errored at first; the order was fine, the checkout page was flaky. Webhook delivery still needs a public HTTPS callback (next step, not blocking the demo).
Accomplishments that we're proud of Full money loop verified live in sandbox: order → buyer approval → capture → payout. Nothing faked, every step has a PayPal receipt. Agent drives the purchase; the human only approves once.
What we learned Always check the order exists before sending someone an approval link — a dead order looks exactly like a broken page. Sandbox is flaky; verify at the API, not just in the browser.
What's next for ProcurePilot Public HTTPS webhook callback so payment events land in real time. Live (non-sandbox) merchant onboarding so a real seller can be paid. More agent guardrails: spending caps and approval rules per purchase.