Inspiration

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for PayPal Agentic Commerce Studio: Policy-Gated Order Ledger

Inspiration

Agentic commerce requires strict financial invariants: floating-point rounding bugs, duplicate order captures on network retries, or unapproved autonomous captures above policy limits can cause real monetary loss.

What it does

PayPal Agentic Commerce Studio (paypal_agent_studio) combines the official APIMatic-generated paypal-server-sdk==2.4.0 with a deterministic financial policy engine:

  1. APIMatic SDK Integration (OrdersController): Uses ClientCredentialsAuthCredentials, Environment.SANDBOX, and TelemetryResponseCatcher (HttpCallBack) to capture full HTTP telemetry.
  2. Exact Integer Minor-Unit Policy Gate: Rejects float currency amounts, enforces merchant category allowlists (software_saas, cloud_compute, office_supplies), auto-captures orders <= $50.00, and holds $50.01-$200.00 in PENDING_HUMAN_APPROVAL until a single-use human approval token is verified.
  3. Deterministic UUIDv5 PayPal-Request-Id & SHA-256 Audit Ledger: Guarantees idempotent retries and cryptographic tamper evidence across the full order lifecycle.

Verification & Testing

  • Unit Tests: 9 passed (pytest -q, including APIMatic OrdersController + policy gate tests)
  • Demo Video: submission_assets/demo_video.mp4 (1920x1080, 150s, H.264/AAC)

Project Overview

PayPal Agentic Commerce Studio combines the official APIMatic-generated PayPal Python Server SDK (paypalserversdk) with an idempotent integer-cents order ledger, Channel3 catalog discovery, SSRF-hardened KERNEL price verification, Human-in-the-Loop (HITL) cryptographic approval tokens, and AG Grid telemetry export.

Multi-Model Pipeline Provenance

  1. Stage 1 — Architecture Design (claude-opus-5-5): DESIGN_OPUS55.md
  2. Stage 2 — Adversarial Architecture Review (gpt-6-luna): REVIEW_LUNA56.md
  3. Stage 3 — Core Implementation (Kimi-K2.7-Code @ Sakura AI Engine): paypal_agent_studio/
  4. Stage 4 — Post-Implementation Code Review (gpt-6-luna): CODE_REVIEW_LUNA56.md

Quickstart

PYTHONPATH=. pytest -v
PYTHONPATH=. python3 -m paypal_agent_studio.cli

Built With

Share this project:

Updates

Submission history