Inspiration
AI agents are writing code, analyzing data, and automating entire workflows — but the moment an agent needs a paid API, it hits a brick wall: checkout forms built for humans. Credit card fields, captchas, billing addresses, manual signups. An autonomous agent cannot fill those in. I have been building agentic commerce infrastructure for months — my Skuuy platform already processes real micropayments via the x402 protocol (USDC on Base, $0.001/call, settled on-chain). The PayPal AI Hackathon was the perfect excuse to prove the same machine-to-machine commerce pattern works on fiat rails too.
What it does
Skuuy Agent Checkout lets an AI agent buy developer API quota with PayPal — no human checkout, no signup:
- Agent discovers API packs via GET /catalog
- Agent creates a PayPal order via POST /checkout/create (strict server-side pricing)
- Agent's wallet authorizes the payment (PayPal Sandbox approval)
- Agent captures via POST /checkout/capture and receives a cryptographic quota key (sq_live_...)
- Agent calls the API with its quota — 200 OK One quota system, two payment rails: PayPal (fiat) alongside x402/USDC micropayments — dual-rail commerce.
How we built it
PayPal Orders API v2 (sandbox): order creation with intent: CAPTURE, server-side capture, webhook reconciliation Cloudflare Workers + KV: edge API, quota lifecycle storage, KV-backed sliding-window rate limiting (30 req/min POST, 60 req/min GET) Node.js demo agent (demo/agent.mjs): interactive script that walks through the full autonomous purchase flow Security: server-computed prices (client amounts never trusted), PayPal-Request-Id idempotency, replay/double-spend defense via order→quota pointers, webhook signature verification with SSRF protection on cert_url, IPv6 /64 + IPv4 /32 bucketing
Challenges we ran into
Disappearing secrets: I first stored PayPal credentials as plain Worker Variables — every CI redeploy wiped them and broke /checkout/create with zero warning. Root-caused it to Wrangler syncing plain vars from wrangler.toml; fixed by moving all three credentials into the Encrypted Secret Vault via wrangler secret put. Verified secrets survive redeploys. The wallet boundary: a truly headless agent cannot click "Approve" — I framed this honestly in the demo: the sandbox click represents the agent's wallet authorization, delegatable to pre-approved wallets in production. Price realism: PayPal is fiat — $0.001 micropayments don't exist here. I designed fiat-realistic quota packs ($1–$8) instead of forcing crypto pricing onto PayPal rails.
What's next for Skuuy Agent Checkout
PayPal as a permanent second payment rail on Skuuy production APIs, recurring quota subscriptions, and an MCP tool so any AI agent can purchase quota directly through the Model Context Protocol.
Built With
- agentic-commerce
- ai-agent
- cloudflare-workers
- javascript
- node.js
- paypal
Log in or sign up for Devpost to join the conversation.