Recipes agents can copy.
Worked flows for discovery, marketplace listings, and live demos. Each recipe maps to the same contract object: create, fund, verify, settle.
Run the full lifecycle with zero real money.
Create with network: "base-sepolia" and every step runs on testnet USDC: create, fund via x402, verify, payout, settled. This is the recommended first contract.
# 1. Create a sandbox contract. Full lifecycle, faucet USDC, no real money.
curl -X POST https://settle.ronakdaya.com/escrow/create \
-H 'content-type: application/json' \
-d '{"network":"base-sepolia","amount_usdc":1,"client_wallet":"client","provider_wallet":"provider","condition":{"type":"api_response","params":{"url":"https://example.com/result","expected_status":"200"},"deadline":"2026-12-31T00:00:00.000Z","fallback":"return_to_client"}}'
# 2. Get Base Sepolia USDC from a faucet (Circle or Coinbase CDP faucets).
# 3. Fund via x402. Bare call returns 402 + PaymentRequirements;
# x402 clients retry with a signed X-PAYMENT header automatically.
curl -X POST https://settle.ronakdaya.com/escrow/{id}/fund-x402
# 4. Claim payout details, then verify. Deterministic conditions
# auto-authorize payout.
curl -X POST https://settle.ronakdaya.com/escrow/{id}/verify
USDC on Base Sepolia · x402$0 · faucet moneyThe funding wall was the v0.1 dropoff. The sandbox removes it without changing the contract shape.
{
"x402Version": 1,
"error": "payment_required",
"accepts": [{
"scheme": "exact",
"network": "base-sepolia",
"maxAmountRequired": "1000000",
"payTo": "0x...",
"asset": "0x036C...DCF7e",
"extra": { "name": "USDC", "version": "2" }
}]
}{
"ok": true,
"id": "stl_...",
"state": "held",
"network": "base-sepolia",
"tx_hash": "0x..."
}Fund conditional work from a Cloudflare Agent.
Cloudflare Agents handle pay-to-access through HTTP 402. Settle uses the same x402 retry shape to fund escrow, then waits for proof before payout.
// Cloudflare Agent using Settle for conditional settlement.
// Use paidTool / withX402 for immediate access.
// Use Settle when payout should wait for proof of completed work.
const contract = await fetch("https://settle.ronakdaya.com/escrow/create", {
method: "POST",
headers: {
"content-type": "application/json",
"Idempotency-Key": crypto.randomUUID()
},
body: JSON.stringify({
network: "base-sepolia",
amount_usdc: 1,
client_wallet: "cloudflare-agent",
provider_wallet: "provider",
condition: {
type: "api_response",
params: { url: "https://example.com/result", expected_status: "200" },
deadline: "2026-12-31T00:00:00.000Z",
fallback: "return_to_client"
}
})
}).then((r) => r.json());
const fundUrl = "https://settle.ronakdaya.com/escrow/" + contract.id + "/fund-x402";
// Wrap this fetch with the Cloudflare Agents x402 client.
// Bare request returns 402 PaymentRequirements; retry with X-PAYMENT moves escrow to held.
const funded = await fetch(fundUrl, { method: "POST" }).then((r) => r.json());
withX402Client · Agents SDKBase Sepolia sandbox · USDCThe payment handshake stays standard. The settlement condition lives in Settle.
tool request -> 402 challenge x402 client signs X-PAYMENT Settle moves escrow to held condition passes payout confirms settled
Use paidTool for immediate access. Use Settle when payment waits for proof: PR merged, API returned, file delivered.
Prove a human authorized the agent.
Settle verifies Verifiable Intent credential chains (open draft spec v0.1) at create time: every signature, every layer binding, and the human's spending cap against the funds being committed. Invalid chains reject the create.
# Create an escrow carrying proof a human authorized the agent.
# verifiable_intent is the merchant-view Verifiable Intent chain
# (open draft spec v0.1: github.com/agent-intent/verifiable-intent).
curl -X POST https://settle.ronakdaya.com/escrow/create \
-H 'content-type: application/json' \
-d '{
"amount_usdc": 5,
"client_wallet": "client",
"provider_wallet": "provider",
"condition": {"type":"manual","params":{},"deadline":"2026-12-31T00:00:00.000Z","fallback":"return_to_client"},
"verifiable_intent": {
"l1": "<issuer SD-JWT>~",
"l2": "<user KB-SD-JWT>~<checkout disclosure>~<payment disclosure>~",
"l3b": "<agent KB-SD-JWT>~<final checkout disclosure>~"
}
}'
agent-intent/verifiable-intent · 0.1-draftES256 · SD-JWT · no new primitivesAn escrow carrying cryptographic proof of human authorization is a better escrow in a dispute.
{
"verifiable_intent": {
"spec": "verifiable-intent",
"spec_version": "0.1-draft",
"verified": true,
"mode": "autonomous",
"prompt_summary": "Escrow up to $2...",
"amount_enforced": true
}
}HTTP 400
{
"error": "verifiable_intent_invalid",
"detail": ["amount_above_mandate_max"]
}Create, fund, and reconcile a $1 Base USDC contract.
This is the shortest path from discovery to a real funded state. Use exact Base USDC. There is no memo on Base or X Layer.
# 1. Create a tiny deterministic contract.
curl -X POST https://settle.ronakdaya.com/escrow/create \
-H 'content-type: application/json' \
-H 'Idempotency-Key: test-001' \
-d '{"amount_usdc":1,"gas_tip_percent":0,"client_wallet":"client","provider_wallet":"provider","condition":{"type":"api_response","params":{"url":"https://example.com/result","expected_status":"200"},"deadline":"2026-12-31T00:00:00.000Z","fallback":"return_to_client"}}'
# 2. Get the Base USDC deposit address.
curl -X POST https://settle.ronakdaya.com/escrow/{id}/fund-usdc-base
# 3. Send exact USDC on Base. No memo.
# 4. If needed, reconcile from the tx hash.
curl -X POST https://settle.ronakdaya.com/escrow/{id}/sync-funding \
-H 'content-type: application/json' \
-d '{"rail":"base_usdc","tx_hash":"0x..."}'
USDC on BasePOST /escrow/{id}/sync-fundingThe chain is the source of truth. Webhooks accelerate; receipt sync reconciles.
{
"deposit_address": "0x...",
"amount": 1,
"currency": "USDC",
"chain": "base",
"memo": null
}{
"ok": true,
"id": "stl_...",
"state": "held",
"rail": "base_usdc",
"tx_hash": "0x..."
}Use a Base agent wallet for conditional work.
Base and Coinbase agent wallets can handle funding, x402, and spend caps. Use Settle when USDC should wait for proof before payout finalizes.
Read https://settle.ronakdaya.com/skill.md. Use my Base agent wallet to fund a $10 USDC escrow on Base. Settle only when https://api.example.com/result returns 200 and contains "done". Register the provider payout address before verification so payout can auto-authorize.
USDC on BaseBase · Coinbase Agentic Wallets · x402Wallet control, payment, and conditional settlement stay separate.
{
"wallet": "Base Account, Coinbase Agentic Wallet, or MCP-controlled wallet",
"funding": "usdc/base",
"condition": "api_response",
"settlement": "after receipt sync"
}Use x402 for pay-to-access. Use Settle when payment waits for proof: PR merged, API returned, file delivered.
Pay a contributor when a PR merges.
For code bounties and agent-generated patches. Deterministic verification can auto-authorize payout once payout details are registered.
Read https://settle.ronakdaya.com/skill.md and create a test escrow for $25 USDC. Settle only when GitHub PR owner/repo#42 is merged. Fallback: return funds to the client if the deadline expires.
merge_sha + merged_atescrow.settledGitHub merge state is objective and repeatable.
{
"kind": "github_pr_merged",
"repo": "owner/repo",
"pr": 42,
"merge_sha": "4f1c…9d3a",
"merged_at": "2026-05-24T17:01:58Z"
}{
"type": "escrow.settled",
"contract_id": "stl_8f2k…3R",
"state": { "from": "settlement_pending", "to": "settled" },
"settlement": { "tx_hash": "0xabc…789" }
}Pay when an API returns the agreed result.
For background jobs, paid tool calls, data enrichment, and long-running workflows with a machine-checkable output.
curl -X POST https://settle.ronakdaya.com/escrow/create \
-H 'content-type: application/json' \
-d '{"amount_usdc":10,"client_wallet":"client","provider_wallet":"provider","condition":{"type":"api_response","params":{"url":"https://api.example.com/result","expected_status":"200","expected_body":"ok"},"deadline":"2026-12-31T00:00:00.000Z","fallback":"return_to_client"}}'
status + matched bodyescrow.settledThe HTTP response is the contract's completion proof.
{
"kind": "api_response",
"status": 200,
"matched_body": true,
"url": "https://api.example.com/result"
}{
"type": "escrow.settled",
"contract_id": "stl_api…004",
"evidence": { "kind": "api_response", "status": 200 },
"settlement": { "tx_hash": "0xabc…789" }
}Pay when a file is delivered.
For reports, exports, designs, media, and freelancer work where a URL and optional hash can prove delivery.
Read https://settle.ronakdaya.com/skill.md and create an escrow for a file delivery. Settle when https://example.com/final.zip is available and its sha256 matches the contract. Use USDC on Base or USDG on X Layer for funding.
url + sha256escrow.settledThe delivered bytes can be fetched and hashed at the edge.
{
"kind": "file_delivered",
"url": "https://example.com/final.zip",
"sha256": "4f1c…9d3a",
"hash_matched": true
}{
"type": "escrow.settled",
"contract_id": "stl_file…240",
"evidence": { "kind": "file_delivered", "hash_matched": true },
"settlement": { "tx_hash": "0xabc…789" }
}Pay when a client confirms a milestone.
For work with subjective acceptance. Manual confirmation is explicit, logged, and does not pretend to be deterministic.
curl -X POST https://settle.ronakdaya.com/escrow/create \
-H 'content-type: application/json' \
-d '{"amount_usdc":50,"client_wallet":"client","provider_wallet":"provider","condition":{"type":"manual","params":{},"deadline":"2026-12-31T00:00:00.000Z","fallback":"return_to_client"}}'
curl -X POST https://settle.ronakdaya.com/escrow/{id}/verify \
-H 'content-type: application/json' \
-d '{"confirmed":true}'
confirmed: trueescrow.settledHuman judgment stays human, but the contract records the decision path.
{
"kind": "manual",
"confirmed": true,
"note": "manual is the escape hatch, not the default"
}{
"type": "escrow.settled",
"contract_id": "stl_manual…100",
"evidence": { "kind": "manual", "confirmed": true },
"settlement": { "tx_hash": "0xabc…789" }
}Settle
Programmable escrow for agent work. Commit funds upfront. Settle after a verifiable condition passes.
- category
- conditional settlement
- primary
POST /escrow/create- payment
POST /escrow/{id}/pay- AgentCash
- Use
POST /x402/contract-draftas the paid, discoverable entrypoint. - status
- v0.1 custodial demo. Tiny amounts only.
- rails
- USDC/Base · USDG/X Layer · x402 · MPP · Stripe sandbox
- cloudflare agents
- Use the x402 client retry loop to fund
/escrow/{id}/fund-x402. - agent wallets
- Use Base or Coinbase agent wallets for funding. Use Settle when payment waits for proof.