
acp-sandbox
com.flo-voice1/acp-sandbox
Agentic Commerce Protocol sandbox: agent builds a cart, human approves a real PayPal payment.
Documentation
acp-sandbox
A hosted mock merchant implementing the Agentic Commerce Protocol (ACP) checkout API, with real PayPal sandbox payments and a hosted MCP server — so an AI agent can shop, ask a human to pay with PayPal, and place the order, end to end, without real money or a real store.
Live at https://acp-sandbox.flo-voice1.com · MCP server: https://acp-sandbox.flo-voice1.com/mcp · Source: https://gitlab.com/florin-builds/acp-sandbox
Launching on TinyLaunch this week. If you like it, an upvote helps: https://tinylaunch.com/launch/24070-acp-sandbox
Why
ACP defines how a shopping agent talks to a merchant to complete a purchase. Payment providers' test modes cover the payment side, but there's no hosted "fake merchant" an agent developer can point their code at to check the whole thing works: building a cart, changing it, getting it paid, handling errors, reading back an order. acp-sandbox is that merchant — and the payment behind its checkout is a real PayPal Orders v2 flow against the PayPal sandbox.
The design rule for money: the agent never pays on its own. It can only create a PayPal order for the exact cart total and hand the human an approval link. The merchant captures the payment only after the buyer approves it on PayPal, and only if PayPal confirms the capture for that amount, currency and checkout.
For judges: try it in 2 minutes
- In Claude (claude.ai or Desktop): Settings → Connectors → Add custom connector →
https://acp-sandbox.flo-voice1.com/mcp(no sign-in). Or use the REST quickstart below. - Ask: "Buy me a demo mug and two notebooks from the acp-sandbox store and pay with PayPal."
- Open the PayPal link the agent gives you and log in with this PayPal sandbox buyer account (test money only):
- Email:
sb-pzbtt53638299@personal.example.com - Password:
FMhp^y7Z
- Email:
- Approve the payment. The agent places the order and returns the receipt and a dashboard link showing every step.
Let an AI agent shop (MCP)
Connect any MCP client to https://acp-sandbox.flo-voice1.com/mcp (Streamable HTTP, no auth — a sandbox key is created on the first checkout).
- Claude (claude.ai / Desktop): Settings → Connectors → Add custom connector → paste the URL.
- Claude Code:
claude mcp add --transport http acp-sandbox https://acp-sandbox.flo-voice1.com/mcp
Then ask: "Buy me a demo mug and two notebooks from the acp-sandbox store and pay with PayPal." The agent builds the cart, gives you a PayPal link, waits while you approve it with a PayPal sandbox buyer account, then places the order and returns the receipt. It also gives you a dashboard link that shows every step it took.
| Tool | What the agent uses it for |
|---|---|
list_products | See what the store sells and the prices |
create_checkout | Start an ACP checkout session with items and quantities (issues a sandbox key if needed) |
update_checkout | Change the cart — any PayPal order for the old total is dropped |
request_paypal_payment | Create the PayPal order for the exact total; returns the approval link for the human |
wait_for_payment_approval | Wait (≤45 s per call) until PayPal confirms the buyer approved |
complete_checkout | Capture the payment and place the order — fails unless PayPal confirms the money |
get_checkout / cancel_checkout | Check status, or back out |
REST quickstart
- Get a test API key (no signup — this is a sandbox):
curl -X POST https://acp-sandbox.flo-voice1.com/keys \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com"}'
# => {"api_key":"acps_test_..."}
- See what you can buy:
curl https://acp-sandbox.flo-voice1.com/catalog
- Create a checkout session:
curl -X POST https://acp-sandbox.flo-voice1.com/checkout_sessions \
-H "Authorization: Bearer acps_test_..." \
-H "Content-Type: application/json" \
-d '{"line_items": [{"id": "item_demo_mug", "quantity": 1}, {"id": "item_demo_notebook", "quantity": 2}]}'
- Pay with PayPal (sandbox) — create the PayPal order, have the buyer approve it, then complete:
curl -X POST https://acp-sandbox.flo-voice1.com/checkout_sessions/{id}/paypal_order \
-H "Authorization: Bearer acps_test_..."
# => session with payment.approve_url — open it and approve with a sandbox buyer account
curl -X POST https://acp-sandbox.flo-voice1.com/checkout_sessions/{id}/complete \
-H "Authorization: Bearer acps_test_..." \
-H "Content-Type: application/json" \
-d '{"payment_data": {"provider": "paypal", "order_id": "<payment.paypal_order_id>"}}'
# => status "completed", payment.status "captured", order with a receipt permalink
Errors you can test against: 422 payment_not_approved (buyer hasn't approved), 422 unknown_payment (an order id this session didn't create), cart changed after the PayPal order (the old order is dropped — create a new one). Any other payment_data keeps the original mock behaviour (accepted as paid, nothing processed) for quick happy-path runs.
- Inspect what your agent sent:
GET /logswith your key, or open the dashboard.
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /keys | Issue a test API key |
| GET | /catalog | Demo items you can reference in line_items |
| POST | /checkout_sessions | Create a session |
| GET | /checkout_sessions/{id} | Retrieve a session |
| POST | /checkout_sessions/{id} | Update a session (line items, buyer, fulfillment) |
| POST | /checkout_sessions/{id}/paypal_order | Create the PayPal (sandbox) order for the session total; returns the buyer's approval link |
| POST | /checkout_sessions/{id}/complete | Finalize checkout (captures the PayPal payment when provider: "paypal"), creates an order |
| POST | /checkout_sessions/{id}/cancel | Cancel a session |
| GET | /orders/{id} | Order receipt (the order.permalink_url) |
| GET | /logs | Last 50 requests made with your key, plus each session's current state |
| GET | /dashboard | The same, in a browser, grouped by checkout session |
| POST | /mcp | Hosted MCP server (Streamable HTTP) |
| GET | /paypal/return, /paypal/cancel | Where PayPal sends the buyer back |
Responses follow the ACP CheckoutSession / Order / Error schemas (2026-04-17 spec version) for the fields this sandbox supports. Fields out of scope (discounts, fulfillment options, …) are omitted rather than faked. payment on a session is this sandbox's own record of the PayPal payment, not an ACP field.
How the PayPal payment works
paypal_ordercalls PayPalPOST /v2/checkout/orders(intentCAPTURE) with the session's line items and exact total,custom_id= the checkout session id, and aPayPal-Request-Idso retrying for the same cart returns the same order.- The buyer approves on PayPal and lands on
/paypal/return; the sandbox asks PayPal to confirm the order isAPPROVEDbefore recording it (the query string alone proves nothing).wait_for_payment_approvalalso asks PayPal directly, so approval counts even if the buyer never reaches the return page. completechecks the order id is the one created for this session and that the cart total hasn't changed, then callsPOST /v2/checkout/orders/{id}/capture(idempotent viaPayPal-Request-Id). The session is marked paid only if the order and the capture areCOMPLETEDfor the expected amount, currency andcustom_id.
Known limitations
- PayPal sandbox only — never real money. Other payment methods are mocked.
- No OAuth
delegate_authenticationflow. - No fulfillment options (shipping/pickup) — sessions go straight to
ready_for_payment. - Fixed demo catalog, not a real product feed.
Run it yourself
npm install
npm run build && npm start # http://127.0.0.1:3900 (or: npm run dev)
For PayPal, create a sandbox REST app at developer.paypal.com and put its keys in ./.env (loaded at startup, never committed):
PAYPAL_CLIENT_ID=...
PAYPAL_CLIENT_SECRET=...
# optional: PUBLIC_BASE_URL=http://127.0.0.1:3900 (where PayPal sends the buyer back)
Without them, everything works except the PayPal routes, which return 503 paypal_not_configured. Storage is Node's built-in node:sqlite (Node 22+, no native dependencies) in ./data/acp-sandbox.db.
License
MIT — see LICENSE.
No installation packages available.