{"uid":"cap_GnbKZxW4_9-2dw6GziaVB","slug":"settle-programmable-escrow-contract-draft-c9b05647","name":"Settle Programmable Escrow - Contract Draft","description":"Programmable escrow API for agent work. Commit funds upfront, verify a condition, and settle after payout confirmation.","url":"https://settle.ronakdaya.com/x402/contract-draft","method":"POST","headers":{},"bodySchema":{"type":"object","required":["task"],"properties":{"pr":{"type":"integer"},"repo":{"type":"string"},"task":{"type":"string"},"amount_usdc":{"type":"number"},"amount_usdg":{"type":"number"},"client_wallet":{"type":"string"},"condition_type":{"enum":["api_response","github_pr_merged","file_delivered","manual"],"type":"string"},"provider_wallet":{"type":"string"}}},"responseSchema":{"type":"object","required":["ok","draft","next_steps"],"properties":{"ok":{"type":"boolean"},"draft":{"type":"object"},"payment":{"type":"object"},"next_steps":{"type":"array","items":{"type":"string"}}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8mxXVAJSEewjh-9_DAIhl","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Creates a programmable escrow contract draft that commits funds upfront, defines a verification condition, and prepares settlement terms for agent-mediated work.","exampleAgentPrompt":"Set up an escrow contract for a coding task: commit 50 USDC from wallet 0xClientABC to provider wallet 0xProviderXYZ, with the condition that PR #42 in repo 'acme-org/backend' is merged — the task is 'Implement OAuth login flow'.","exampleUseCases":[{"title":"Freelancer payment for design deliverable","prompt":"I need to pay my designer 200 USDC for a website mockup, but I want the money held in escrow until they deliver the final Figma file and I approve it. Set up an escrow contract from my wallet to theirs with approval as the release condition."},{"title":"Bug bounty reward with verification","prompt":"We're offering 500 USDC for anyone who finds and reports a critical vulnerability in our smart contract. Create an escrow agreement that locks the bounty until our security team verifies the submission and confirms it's a legitimate critical issue."},{"title":"Agent task completion insurance","prompt":"I'm hiring an AI agent to scrape and organize 10,000 product listings into a CSV file for 100 USDC. I want the payment held in escrow until the agent delivers the file and I confirm all the data is correct and properly formatted."}],"resultDescription":"Returns a JSON object with an 'ok' boolean, a 'draft' object containing the escrow contract details, an optional 'payment' object, and a 'next_steps' array listing what to do next to finalize and activate the escrow.","failureModes":["Missing required 'task' field returns validation error","Invalid or missing wallet addresses cause contract draft failure","Unsupported condition_type value may result in unrecognized condition error","Amount fields set to zero or negative values may be rejected","Network or server error returns non-200 response with no draft object"],"whenToPreferThis":"Use this endpoint when you need to create a trust-minimized, condition-based escrow contract draft for agent or freelance work — especially when payment should be held until a verifiable condition (like a GitHub PR merge) is met. Prefer this over generic payment APIs when you need programmable, conditional settlement with on-chain wallets and USDC/USDG amounts.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:37:17.909Z","isFirstParty":false}