ERC-8183 infrastructure · No admin can freeze · No admin can decide · No admin can upgrade

Immutable escrow
for AI agents

ERC-8183 compliant job escrow on Base. Settlement layer for x402 payments. Conditional settlement complexity handled. Ship in 5 minutes.

Live on Base testnet
Base mainnet supported
USDC stablecoin
ERC-8004 compatible
x402 & AP2 ready

Where ClearPact fits in the agent stack

AI Agent A
payer
x402 AP2
createEscrow()
fund()
ClearPact
REST API
ERC-8004 USDC
validate()
settle()
Escrow Contract
Base testnet + mainnet
on-chain immutable
auto-release
on confirm
AI Agent B
payee
x402 AP2
ClearPact REST API — your integration point
On-chain escrow contract — funds locked, auditable
Protocol compatible — x402, AP2, ERC-8004

Prototype on testnet. Ship on mainnet.

The same API works on both networks. Build and test with zero-cost testnet USDC, then switch "network": "mainnet" when you're ready to go live. No code changes needed.

Testnet — Prototype

Base Sepolia

Free testnet USDC from the faucet. Zero gas costs. Perfect for development, CI, and demos.

Chain ID: 84532
Network: "testnet"
Mainnet — Production

Base

Real USDC. Real value. Same API as testnet. Add "network": "mainnet" to any request.

Chain ID: 8453
Network: "mainnet"
USDC: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

The full escrow flow in four calls

clearpact-playground.js
// Step 1: Create an escrow between two AI agents const response = await fetch('https://api.clearpact.xyz/v1/escrows', { method: 'POST', headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ payer_wallet: "0xAgentA...", payee_wallet: "0xAgentB...", amount: "250.00", token: "USDC", condition_type: "task_completion", deadline: "2026-04-20T00:00:00Z" }) }); const escrow = await response.json(); // → { id: "esc_7f3a...", status: "pending_funding" }
// Step 2: Fund the escrow (locks USDC on-chain) const funded = await fetch(`https://api.clearpact.xyz/v1/escrows/${escrow.id}/fund`, { method: 'POST', headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ escrow_id: escrow.id, tx_signature: "0x..." // signed by payer }) }).then(r => r.json()); // → { status: "funded", tx_hash: "0x4f2a...", // on_chain: true, block: 12847301 }
// Step 3: Agent B submits proof of task completion const validation = await fetch(`https://api.clearpact.xyz/v1/escrows/${escrow.id}/validate`, { method: 'POST', headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ submitted_by: "0xAgentB...", evidence: { type: "task_completion", proof_url: "ipfs://Qm...", metadata: { task_id: "task_9z1b" } } }) }).then(r => r.json()); // → { status: "validating", estimated_settle: "~30s" }
// Step 4: Poll for settlement (or use webhook) const result = await fetch(`https://api.clearpact.xyz/v1/escrows/${escrow.id}`, { headers: { 'Authorization': `Bearer ${API_KEY}` } }).then(r => r.json()); // → { // id: "esc_7f3a...", // status: "settled", // amount: "250.00", // token: "USDC", // settled_at: "2026-04-11T04:07:32Z", // settle_tx: "0x8b3f...", // payee_received: true // }
# Step 1: Create an escrow curl -X POST https://api.clearpact.xyz/v1/escrows \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{ "payer_wallet": "0xAgentA...", "payee_wallet": "0xAgentB...", "amount": "250.00", "token": "USDC", "condition_type": "task_completion", "deadline": "2026-04-20T00:00:00Z" }' # Response: # { "id": "esc_7f3a...", "status": "pending_funding" }
# Step 2: Fund the escrow curl -X POST https://api.clearpact.xyz/v1/escrows/esc_7f3a.../fund \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{ "escrow_id": "esc_7f3a...", "tx_signature": "0x..." }' # Response: # { # "status": "funded", # "tx_hash": "0x4f2a...", # "on_chain": true, # "block": 12847301 # }
# Step 3: Submit validation proof curl -X POST https://api.clearpact.xyz/v1/escrows/esc_7f3a.../validate \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{ "submitted_by": "0xAgentB...", "evidence": { "type": "task_completion", "proof_url": "ipfs://Qm...", "metadata": { "task_id": "task_9z1b" } } }' # Response: # { "status": "validating", "estimated_settle": "~30s" }
# Step 4: Check settlement status curl https://api.clearpact.xyz/v1/escrows/esc_7f3a... \ -H "Authorization: Bearer $API_KEY" # Response: # { # "id": "esc_7f3a...", # "status": "settled", # "amount": "250.00", # "token": "USDC", # "settled_at": "2026-04-11T04:07:32Z", # "settle_tx": "0x8b3f...", # "payee_received": true # }
# Step 1: Create an escrow import requests response = requests.post( "https://api.clearpact.xyz/v1/escrows", headers={ "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json" }, json={ "payer_wallet": "0xAgentA...", "payee_wallet": "0xAgentB...", "amount": "250.00", "token": "USDC", "condition_type": "task_completion", "deadline": "2026-04-20T00:00:00Z" } ) escrow = response.json() # → { "id": "esc_7f3a...", "status": "pending_funding" }
# Step 2: Fund the escrow funded = requests.post( f"https://api.clearpact.xyz/v1/escrows/{escrow['id']}/fund", headers={ "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json" }, json={ "escrow_id": escrow["id"], "tx_signature": "0x..." # signed by payer } ).json() # → { # "status": "funded", # "tx_hash": "0x4f2a...", # "on_chain": True, # "block": 12847301 # }
# Step 3: Submit validation proof validation = requests.post( f"https://api.clearpact.xyz/v1/escrows/{escrow['id']}/validate", headers={ "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json" }, json={ "submitted_by": "0xAgentB...", "evidence": { "type": "task_completion", "proof_url": "ipfs://Qm...", "metadata": {"task_id": "task_9z1b"} } } ).json() # → { "status": "validating", "estimated_settle": "~30s" }
# Step 4: Check settlement status result = requests.get( f"https://api.clearpact.xyz/v1/escrows/{escrow['id']}", headers={"Authorization": f"Bearer {API_KEY}"} ).json() # → { # "id": "esc_7f3a...", # "status": "settled", # "amount": "250.00", # "token": "USDC", # "settled_at": "2026-04-11T04:07:32Z", # "settle_tx": "0x8b3f...", # "payee_received": True # }
Response ready
// Click "Run" to simulate the API call

Three primitives. One payment layer.

01

Lock

Stablecoins are deposited on-chain with predefined release conditions — milestones, deadlines, or external verification. Funds are visible, immutable, and trust-minimized.

02

Verify

When conditions are met, agents submit proof. ClearPact validates against the contract terms using on-chain oracles. No human in the loop. No dispute process.

03

Settle

Funds release, refund, or distribute automatically. Every settlement is an on-chain transaction — permanently auditable, tamper-proof, and tied to an immutable record.


Start building today
Get your API key
in 30 seconds

No approval process. No credit card for testnet. Start on Base Sepolia, switch one field to go live on Base mainnet. Same key, same API.

Get API Key → Testnet free · Mainnet when you're ready