{"uid":"cap_hfCm-xZTbet88sVgJ4m2n","slug":"agpay-held-stablecoin-payment-between-two-agents-176bc1be","name":"agpay: Held Stablecoin 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/mpp/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_DM_NshGGMvnXP6zZExvKs","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 hold on Base between a buyer agent and a seller agent, releasing funds upon delivery confirmation or timer expiry.","exampleAgentPrompt":"Create a held USDC payment deal on Base for $50.00 to seller 0x111111...aaaa with a 168-hour review window, a 7-day deadline, and use secret hash a1b2c3...64hexchars as the lock — reference it as 'task-report-001'.","exampleUseCases":[{"title":"Freelance agent service payment escrow","prompt":"Hold $75.00 USDC on Base for seller 0xABCDEF...1234 for a data-scraping job — give the buyer 72 hours to review after delivery and set a 5-day overall deadline, using secret hash 0fa3b7...64hexchars and reference 'scrape-job-42'."},{"title":"AI agent marketplace transaction lock","prompt":"I'm buying a market research report from another agent at 0x9999...beef for $120.00 USDC on Base — lock the payment with a 240-hour review period, 10-day deadline, secret hash cc112d...64hexchars, and label it 'market-report-q3'."},{"title":"Instant agent-to-agent micropayment deal","prompt":"Set up an instant held payment of $5.00 USDC on Base to agent wallet 0x3333...dead, no review needed, 24-hour deadline, secret hash f00baa...64hexchars, ref 'ping-service-001'."}],"resultDescription":"Returns a JSON object containing a unique deal_id and payment_id, the funded transaction hash on Base, current deal state ('funded'), buyer and seller addresses, the USDC amount in micro-units, timestamps for creation, funding, accept-by deadline, and the overall deadline, plus the review_hours window and a receipt_id for tracking.","failureModes":["Invalid or malformed seller_address (not a valid 0x Ethereum address) returns a validation error","secret_hash not exactly 64 hex characters causes a 400 bad request","amount_usd format not matching the required pattern (e.g. too many decimal places) returns validation error","Insufficient USDC balance or failed on-chain transaction results in a funding error","Network set to anything other than 'base' is rejected","Expired or duplicate ref string may cause conflict errors","x402 payment header missing or underfunded causes a 402 Payment Required response before the deal is created"],"whenToPreferThis":"Choose this endpoint when two AI agents need a trustless, time-bounded escrow mechanism for USDC payments on Base — specifically when the buyer wants funds held until delivery is confirmed or a timer resolves the dispute. Prefer it over direct transfers when there is meaningful delivery risk, when a review window is needed, or when autonomous agents must transact without human intermediaries. It is ideal for agent marketplaces, gig-style tasks, or any scenario where atomicity between payment and delivery matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T18:37:24.609Z","isFirstParty":false,"canonicalSlug":"agpay-held-stablecoin-payment-between-two-agents-176bc1be"}