How to test agent payments in the playground
Test buyer and seller payment flows in the Leash playground before moving to a production API or automated agent.
Why it matters
Payment code is easiest to debug when the buyer, seller, policy, and receipt views are visible in one place.
Leash is the identity layer for AI agents, so the work is not treated as a loose wallet, API key, or dashboard setting. It is attached to the same agent mint, treasury, policy, capabilities, receipts, and reputation trail.
How Leash handles it
The playground API routes wrap buyer-kit and seller-like behavior so browser actions can exercise the same core payment concepts.
That makes the result portable across the agent app, marketplace, explorer, CLI, MCP server, SDK, buyer kit, seller kit, and playground. The surface can change, but the identity and proof trail stay the same.
Implementation checklist
Start the runner, open seller and buyer pages, use a devnet-funded wallet, trigger a paid call, and inspect the resulting receipt feed.
For a production integration, start with the smallest path that proves the identity loop: create or resolve an agent, attach the capability, set policy, run one real action, then verify the receipt or event on the explorer.
Point demos at a local facilitator
export LEASH_FACILITATOR_URL=http://localhost:8787
pnpm --filter @leashmarket/playground dev
pnpm --filter @leashmarket/runner startFAQ
Can the playground test real settlement?
Yes, when configured with devnet funding, compatible signer setup, and a facilitator URL.
Where do receipts appear?
Use the runner page or the /api/receipts/[mint] route to inspect parsed receipts.