← zambo.dev

Agent payments

Pay for access without turning the agent into a browser.

Zambo uses HTTP 402 to return a machine-readable challenge. The automatic path uses an EIP-3009 USDC authorization on Base. The manual fallback uses day_pass_activate and a confirmed transaction hash. The crew does not execute a payment in this guide.

Machine-executable checklist

  1. Request a gated resource without payment and inspect the HTTP 402 response.
  2. Read accepts[0] for the network, USDC asset, amount, destination, and timeout.
  3. Have the payer sign the EIP-3009 TransferWithAuthorization payload, then base64-encode the JSON envelope.
  4. Retry the same request with the envelope in X-Payment or PAYMENT-SIGNATURE. Preserve the returned spend receipt and access capability.
# 1. Request the deterministic challenge
curl -i https://zambo.dev/api/x402/discovery

# 2. Inspect the challenge
curl -s https://zambo.dev/api/x402/discovery | python3 -m json.tool

# 3-4. After the payer has signed the live challenge:
curl -s https://zambo.dev/api/x402/discovery \
  -H "X-Payment: <base64 JSON payment envelope>"

The successful response contains the confirmed settlement and a public spend-receipt URL. It does not expose the bearer access key in that public receipt.

Manual fallback

Call day_pass_activate with no arguments to receive a payment intent. Follow the returned agent_flow and send exactly the requested USDC on Base. Then call the same tool with payment_intent and the confirmed tx_hash. Zambo checks the recipient, asset, amount, sender binding, and confirmation before activating access. Pending or unrelated transfers do not unlock access.

{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"day_pass_activate","arguments":{}}}

Agents: prefer day_pass_activate for the manual intent flow; the settlement steps are also documented in llms.txt, Paying with x402.

Receipts and refusal records

A refused payment returns HTTP 402 with a refusal record, a policy reason, a retryable flag, an attempt hash, and a fresh challenge. The JSON verifier is at /api/x402/refusal-receipt/<id>; the server-rendered audit URL is returned by the receipt. A successful payment returns a spend receipt with the challenged resource, chain, asset, destination, amount, canonical payload hash, settlement transaction, expiry, and audit URL.

FAQ

What if my wallet is on another chain?

The live challenge names Base and the USDC contract. Do not substitute another chain or asset; request a fresh challenge and follow its current accepts value.

What if I overpay?

The authorization must match the quoted challenge. An incorrect amount is refused and marked retryable when correcting the request is safe; no access claim should be made from a refused attempt.

How do I get a receipt for accounting?

Keep the spend receipt returned after confirmed settlement. It includes the settlement transaction and a public audit URL that can be checked independently.

Can I pay with a card instead?

Yes. The human Day Pass checkout is available at /day-pass#day-pass-section. After activation, verify access before retrying the unchanged job.

Install the MCP connection → · Read the longer walkthrough →