Inspiration
Operations managers, engineering leads, freelance collectives, and everyday consumers want AI agents to search across retailers, compare hardware or service quotes, and complete transactions automatically. In practice, nobody trusts an autonomous LLM with raw credit card numbers or banking credentials because models hallucinate quantities, retry failed tool calls into duplicate charges, deal with unverified counterparties, or blow past budgets.
We built PayPal Sentinel to eliminate the trust barrier in agentic commerce by cleanly decoupling flexible AI discovery and reasoning from deterministic Rust financial guardrails on top of the PayPal Developer Platform.
What It Does
PayPal Sentinel is an autonomous shopping, procurement, and settlement desk. AI agents discover real retail products through Channel3, evaluate counterparty risk with TypeSafe AI (jev-1.13.0), submit payment intents through a deterministic Rust (axum + tokio) Spend-Policy Guardrail Engine, and settle transactions in the PayPal Sandbox using Orders v2, Batch Payouts v1, Invoicing v2, Disputes v1, Subscriptions v1, and Shipment Tracking v1.
The application serves as an All-Concept Suite that unifies three core workflows: Safe Procurement, Milestone Escrow (PayPal Pact), and Multi-Party Revenue Splitting (PayPal SplitStream) across 12 live executable patterns covering every official Devpost track. Operators monitor live spend vs blocked attempts inside an AG Studio (AgGridReact v36) telemetry grid and supervise vendor delivery timelines on a Bryntum Resource Scheduler wired to live PayPal Trackers.
How We Built It (PayPal Developer Platform, AI, and Rust)
- PayPal Developer Platform and AI Toolkit (
@paypal/agent-toolkitand@paypal/mcp): Our Rust backend implements OAuth 2.0 token caching with automatic 60-second pre-expiry refresh and 401 retry, deterministic RFC 4122 UUIDPayPal-Request-Ididempotency headers, server-to-server Orders v2 direct card capture (POST /v2/checkout/orderswith Sandbox ACDC Visa4012888888881881), negative decline testing (PayPal-Mock-Response: INSTRUMENT_DECLINEDandCCREJECT-IF), Shipment Tracking (POST /v1/shipping/trackers-batch), and Reporting (GET /v1/reporting/transactionswith fractional milliseconds stripped for PayPal 31-day compliance). Furthermore, we patch real gaps in official PayPal tooling by introducing Rust-guarded Batch Payouts (fixing@paypal/agent-toolkitissue 107) and automated Dispute Evidence submission (fixing@paypal/agent-toolkitissues 109 and 118). - High-Assurance Rust Guardrail Engine (
backend-rust/): Built withaxum,tokio,reqwest,hmac,sha2, andthiserrorwith zero.unwrap()calls on request paths. Before any network call reaches PayPal, Rust enforces per-order caps ($500 default), daily treasury limits ($2,500 default), counterparty risk ceilings (less than or equal to 35 out of 100), SHA-256 hash-chained spend permits, replay deduplication (409 CONFLICT), and constant-time HMAC-SHA256 webhook verification. - Sponsor Integrations Across the Pipeline:
- Channel3: Queries
POST https://api.trychannel3.com/v1/searchin agentic mode, injecting active Rust spend ceilings into search filters and normalizing nested retailer offer prices and inventory availability. - AG Grid v36 and AG Studio: Powers the enterprise financial ledger with custom cell renderers, quick filtering, CSV export, and a natural-language Studio KPI Agent synthesizing spend telemetry.
- Bryntum Scheduler: Renders zoomable vendor procurement lanes where milestone completions invoke PayPal Shipment Trackers live.
- APIMatic Context Plugin: Enforces typed OpenAPI 3.1 contracts across Orders v2, Trackers v1, and Payouts v1.
- Render Blueprint and Railway Production: Deployed live at
https://paypal-sentinel-production.up.railway.appwith companionrender.yamlBlueprint for Render cloud infrastructure.
- Channel3: Queries
Judge Testing Instructions (Zero API Key Setup Required)
- Zero-Setup 1-Click Judge Sandbox Mode:
Open
https://paypal-sentinel-production.up.railway.app. Click "1-Click Re-Seed Judge Sandbox" in the top-right card to initialize pre-funded Sandbox Buyer and Merchant accounts, retail catalog items, and Bryntum fulfillment milestones with zero API keys required. - Flow 1 (Channel3 Discovery & PayPal Orders v2 Capture):
In Command Split, search
monitorin Channel3 Product Search, select the UltraSharp 32 4K USB-C Hub Monitor ($445), and click "1-Click Card *1881 Capture" to execute a guarded capture ($425.00 to $870.00 settled). - Flow 2 (Adversarial Guardrails, Decline, and Dispute Evidence Shield):
Click "Simulate Overspend Guardrail ($850)" (
SINGLE_ORDER_CAP_EXCEEDED, zero dollars charged) and "Simulate INSTRUMENT_DECLINED" (CCREJECT-IF). Click any settled order row to inspect its SHA-256 hash-chained Spend Permit or trigger the Seller Dispute Evidence Shield. - Flow 3 (AG Studio Grid & Bryntum Shipment Resource Scheduler):
Open AG Studio Grid to run natural-language KPI queries and CSV export. Open Bryntum Scheduler and click "DELIVERED" on Milestone ms-02 to attach a PayPal Shipment Tracker (
POST /v1/shipping/trackers-batch) and advance SLA completion to 100 percent. - Flow 4 (Found Inspiration Studio across all 5 Devpost Tracks): Open Inspiration Studio to execute all 12 live PayPal + AI patterns with instant tactile breakdowns and live Sandbox receipts.
Challenges We Ran Into and What We Learned
- Headless End-to-End PayPal Sandbox Testing Without Browser Walls:
Standard Orders v2 creation stops at
CREATEDawaiting a buyer login popup. By combining US Sandbox ACDCpayment_source.card(4012888888881881) with deterministicPayPal-Request-IdUUID derivation and a 1-Click Judge Sandbox fallback, automated CI suites and hackathon judges can verifyCOMPLETEDcaptures and negative decline handling with zero manual friction. - Bridging Tooling Gaps in
@paypal/agent-toolkit: The official toolkit lacked programmatic Payouts capabilities (Issue 107) and only offered surrender-onlyaccept_dispute_claimactions for disputes (Issues 109 and 118). We authored custom Rust-guarded tools (sentinel_batch_payoutwith 30-daysender_batch_iddeduplication andsentinel_dispute_evidence_shieldwith cryptographic intent proof) to deliver complete end-to-end functionality. - Timestamp Normalization and Channel3 Offer Formatting:
PayPal's
/v1/reporting/transactionsrejects ISO-8601 timestamps containing milliseconds, while Channel3 nests live prices insideoffers[0].price.price. Encoding these contracts into strict Rust domain types and unit tests prevented subtle runtime failures.
What Is Next
We plan to expand PayPal Sentinel with multi-signatory Slack approval webhooks for corporate procurement, automated seller dispute defense packaging carrier delivery geofencing data, and multi-tenant virtual card provisioning for autonomous enterprise agent fleets.
Built With
- ag-grid
- ai-agents
- apimatic
- axum
- bryntum
- channel3
- nextjs
- paypal
- paypal-agent-toolkit
- paypal-mcp
- paypal-sandbox
- railway
- render
- rust
- tokio
- typescript