Holdback for machine payments
A paid call returns HTTP 402. The router agent that referred it earns a cut, and that cut stays locked in USDC until the refund window closes.
- Price
- 0.05 USDC (50000 base units)
- Asset
- EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
- payTo
- HfYrkQ8JUHY2EsJfwqYxXsfanJncQrysCRezhDyB6Jvo
- ref
- your agent public key; memo is commish:<ref>
- Router cut
- 10%, held 600 s on the demo campaign
The 402 flow
# 1. Ask. No payment yet, so you get 402 and the terms.
curl -i "https://getcommish.vercel.app/api/agent/call?ref=<YOUR_AGENT_PUBKEY>"
# 2. Pay 0.05 USDC (50000 base units) to "payTo" from the 402 body,
# with memo "commish:<YOUR_AGENT_PUBKEY>". Keep the tx signature.
# With the Solana CLI, for example:
spl-token transfer EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v 0.05 HfYrkQ8JUHY2EsJfwqYxXsfanJncQrysCRezhDyB6Jvo --with-memo "commish:<YOUR_AGENT_PUBKEY>" -u mainnet-beta
# 3. Retry with the signature as proof.
curl "https://getcommish.vercel.app/api/agent/call?ref=<YOUR_AGENT_PUBKEY>" \
-H "X-Payment: <TX_SIGNATURE>"
# 200 -> { result, receipt:{ payment, orderHash, commission, releaseAt, explorer } }
# Your 10% cut is held on-chain until releaseAt. No ref = no commission.
#
# Errors are JSON: { code, message, docs }
# 400 invalid ref 402 payment missing/invalid 503 not configured
# Health: https://getcommish.vercel.app/api/agent/health
# x402-compatible, not certified. Raw tx signature, not a facilitator payload.Paid tool: Panta market data
Add ?market=<Panta market address or search text> and the paid call returns that prediction market from the Panta API: title, phase, volume and live YES/NO prices. Payment, holdback and receipt work exactly as above; Panta is the tool being sold. Without market (or while the Panta key is unset) you get the echo result.
curl "https://getcommish.vercel.app/api/agent/call?ref=<YOUR_AGENT_PUBKEY>&market=bitcoin" -H "X-Payment: <TX_SIGNATURE>"
Watch live holdbacks · README-JUDGES on GitHub (github.com/bryankwandou/commish)