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)

  1. PayPal Developer Platform and AI Toolkit (@paypal/agent-toolkit and @paypal/mcp): Our Rust backend implements OAuth 2.0 token caching with automatic 60-second pre-expiry refresh and 401 retry, deterministic RFC 4122 UUID PayPal-Request-Id idempotency headers, server-to-server Orders v2 direct card capture (POST /v2/checkout/orders with Sandbox ACDC Visa 4012888888881881), negative decline testing (PayPal-Mock-Response: INSTRUMENT_DECLINED and CCREJECT-IF), Shipment Tracking (POST /v1/shipping/trackers-batch), and Reporting (GET /v1/reporting/transactions with 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-toolkit issue 107) and automated Dispute Evidence submission (fixing @paypal/agent-toolkit issues 109 and 118).
  2. High-Assurance Rust Guardrail Engine (backend-rust/): Built with axum, tokio, reqwest, hmac, sha2, and thiserror with 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.
  3. Sponsor Integrations Across the Pipeline:
    1. Channel3: Queries POST https://api.trychannel3.com/v1/search in agentic mode, injecting active Rust spend ceilings into search filters and normalizing nested retailer offer prices and inventory availability.
    2. 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.
    3. Bryntum Scheduler: Renders zoomable vendor procurement lanes where milestone completions invoke PayPal Shipment Trackers live.
    4. APIMatic Context Plugin: Enforces typed OpenAPI 3.1 contracts across Orders v2, Trackers v1, and Payouts v1.
    5. Render Blueprint and Railway Production: Deployed live at https://paypal-sentinel-production.up.railway.app with companion render.yaml Blueprint for Render cloud infrastructure.

Judge Testing Instructions (Zero API Key Setup Required)

  1. 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.
  2. Flow 1 (Channel3 Discovery & PayPal Orders v2 Capture): In Command Split, search monitor in 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).
  3. 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.
  4. 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.
  5. 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

  1. Headless End-to-End PayPal Sandbox Testing Without Browser Walls: Standard Orders v2 creation stops at CREATED awaiting a buyer login popup. By combining US Sandbox ACDC payment_source.card (4012888888881881) with deterministic PayPal-Request-Id UUID derivation and a 1-Click Judge Sandbox fallback, automated CI suites and hackathon judges can verify COMPLETED captures and negative decline handling with zero manual friction.
  2. Bridging Tooling Gaps in @paypal/agent-toolkit: The official toolkit lacked programmatic Payouts capabilities (Issue 107) and only offered surrender-only accept_dispute_claim actions for disputes (Issues 109 and 118). We authored custom Rust-guarded tools (sentinel_batch_payout with 30-day sender_batch_id deduplication and sentinel_dispute_evidence_shield with cryptographic intent proof) to deliver complete end-to-end functionality.
  3. Timestamp Normalization and Channel3 Offer Formatting: PayPal's /v1/reporting/transactions rejects ISO-8601 timestamps containing milliseconds, while Channel3 nests live prices inside offers[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
Share this project:

Updates

Submission history