{"uid":"cap_pNAtxGvYlsfeWt5WFFcJw","slug":"agpay-held-payment-between-two-agents-adaffd10","name":"agpay Held Payment Between Two Agents","description":"agpay holds a stablecoin payment between two AI agents until the seller delivers and the buyer confirms, or a timer decides. USDC on Base.","url":"https://agpay.shveik.dev/v1/x402/deal?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"ref":{"type":"string","maxLength":200},"instant":{"type":"boolean"},"network":{"enum":["base"],"type":"string"},"amount_usd":{"type":"string","pattern":"^(0|[1-9][0-9]{0,11})(\\.[0-9]{1,2})?$"},"secret_hash":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"},"review_hours":{"type":"integer"},"deadline_hours":{"type":"integer"},"seller_address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}}},"responseSchema":{"type":"json","example":{"ref":"report-4…","note":"act only…","asset":"USDC","buyer":"0x222222…","state":"funded","amount":5000000,"deal_id":"dl_01234…","instant":false,"network":"base","tx_hash":"0x9f2c4a…","accept_by":1791475260,"funded_at":1791302460,"created_at":1791302400,"payment_id":"pay_0123…","receipt_id":"dl_01234…","deadline_at":1791907260,"review_hours":168,"seller_address":"0x111111…"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.597","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.597/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.597","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.597","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_W_yiycZHPqCvhZbeluH0g","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.597","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Creates an escrow-style USDC payment deal on Base that holds funds until the seller delivers and the buyer confirms, or a deadline timer resolves it.","exampleAgentPrompt":"Hold 50 USDC in escrow for a deal with seller 0x111111...abcd on Base — give the buyer 72 hours to accept and a 168-hour review window after delivery, using secret hash a3f9...0b12, and reference it as 'task-report-7'.","exampleUseCases":[{"title":"Agent freelance task payment","prompt":"Lock 25 USDC on Base as escrow for a job I'm giving to seller 0xAAAA...1234 — give them 48 hours to accept the deal and allow a 96-hour review period after they deliver, with secret hash 00ff...ee11 and reference 'design-task-3'."},{"title":"Data delivery guarantee","prompt":"Set up a held USDC payment of 100 dollars for a data-delivery deal with seller 0xBBBB...5678 on Base, 24-hour acceptance deadline, 72-hour review window, secret hash cc99...aa77, and tag it as 'dataset-purchase-12'."},{"title":"Agent marketplace trade with instant release","prompt":"Create an instant-release escrow deal on Base for 10 USDC with seller 0xCCCC...9abc, no review delay needed, 12-hour deadline, secret hash 1234...abcd, reference 'quick-trade-5'."}],"resultDescription":"Returns a JSON object containing the deal ID, payment ID, receipt ID, on-chain transaction hash, funded timestamp, accept-by and deadline timestamps, review hours, current state (e.g. 'funded'), buyer and seller Ethereum addresses, asset type (USDC), and amount in micro-units — everything needed to track and later settle the escrow.","failureModes":["Invalid seller_address format — must be a 0x-prefixed 40-hex-char Ethereum address","Invalid secret_hash — must be a 64-character hex string","amount_usd out of range or wrong format","Network not 'base' — only Base mainnet supported","Payment not received (x402 payment protocol failure)","Deadline or review hours missing or non-integer","Duplicate ref collision causing deal rejection"],"whenToPreferThis":"Use this endpoint when two AI agents need a trustless, time-bounded escrow for a USDC payment on Base — especially when neither party fully trusts the other and you need an automatic timer-based fallback resolution. Prefer this over direct transfers when the buyer must confirm delivery before funds are released, or when you need a cryptographic secret-hash mechanism to coordinate release.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T18:41:35.706Z","isFirstParty":false,"canonicalSlug":"agpay-held-payment-between-two-agents-adaffd10"}