programmable escrow
for agent work.
Pay-to-access is not enough for work. Settle commits funds upfront and settles only after a verifiable condition passes: HTTP response, GitHub merge, file hash, or signed attestation.
$ curl -fsSL settle.ronakdaya.com/skill.md
| claude
- conditions
- api · github · file · manual
- public states
- 9
- terminal states
- named
- webhooks
- HMAC v0.1
- spec
- openapi · skill.md
x402 tells agents how to pay. Settle tells them when payment is allowed to finalize.
Invoices weren't built for software.
- 01Work is deliveredNo commitment that payment will arrive.
- 02Invoice is sentHuman-readable, machine-opaque. PDFs, emails, sometimes terms.
- 03Net-30 waitFunds sit on the seller's balance sheet as receivables. Sometimes Net-60. Sometimes never.
- 04Dispute or chaseHuman-resolved. Lawyers, Slack threads, threats of small-claims court.
- 05Payment lands (maybe)Plus chargeback risk for 60–120 days.
- 01POST /escrow/createParties, amount, deadline, condition, fallback. JSON in, contract id out.
- 02Client funds escrowUSDC on Base or USDG on X Layer is the primary v0.1 path. x402 and MPP expose rail discovery. Stripe Checkout / Link is sandbox on-ramp testing.
- 03Settle verifiesHTTP poll, webhook, file hash, manual attestation. The condition is the SLA.
- 04Release or refundDeterministic conditions can authorize payout automatically once the provider has registered payout details. Subjective work stays manual. Deadline passes first, the fallback runs.
Bounties, agents, freelancers, APIs.
The lifecycle.
Inside a contract.
create
Define parties, amount, deadline, fallback, and verification condition. Starts in pending_funding.
fund
Primary path: USDC on Base or USDG on X Layer. x402 and MPP expose rail discovery. Stripe Checkout / Link is sandbox on-ramp testing.
watch
Settle verifies the condition. HTTP polling, webhook, file hash, or manual attestation. Audit log per contract.
resolve
Pass → settled. Deadline first → fallback runs. Terminal states are settled, refunded, expired, and disputed.
// content-type: application/json { "amount_usdg": 10, "client_wallet": "0xclient", "provider_wallet": "0xprovider", "condition": { "type": "github_pr_merged", "params": { "repo": "openai/codex", "pr": "1234" }, "deadline": "2026-12-31T17:00:00Z", "fallback": "return_to_client" } } // → 201 created // { id: "stl_8f2k…3R", state: "pending_funding" }
// content-type: application/json { "id": "evt_2k9h…7P", "contract_id": "stl_8f2k…3R", "type": "escrow.settled", "created_at": "2026-05-14T17:02:14Z", "state": { "from": "settlement_pending", "to": "settled" }, "evidence": { "type": "github_pr_merged", "merged_at": "2026-05-14T17:01:58Z", "merge_sha": "4f1c…9d3a" }, "settlement": { "to": "0xprovider", "amount_usdg": 10, "tx_hash": "0xabc…789" } }
What happens to your funds.
Funding creates the hold.
Stablecoin funding moves the contract from pending_funding to held. Stripe Checkout / Link is sandbox on-ramp testing until live Stripe is activated.
Verification gates settlement.
Objective signals can auto-authorize payout. Manual attestation still requires a human confirmation.
Settlement needs a receipt.
Settle marks settled only after payout confirmation or a signed payout webhook records the transfer.
Gas is operator-managed.
Gas reserve tip defaults to 0%. If added, it funds the operator vault's gas balance. Provider payout remains the escrow amount.
Fallbacks are explicit.
If the deadline wins, the contract follows its fallback: usually refund to client, sometimes release to provider.
Every transition is logged.
State changes emit an audit event and can be delivered to subscribers by signed webhook.
Supported conditions.
API response checks.
The most common signal. Used for agent-to-agent and metered API contracts. Type api_response.
Pull request merged.
For bounties on public work. The proof is the merge. Type github_pr_merged.
File at URL with hash.
For freelance and deliverable-based work. The condition passes when the file at the URL matches the hash. Type file_delivered.
Manual attestation.
When no machine signal exists. The client posts confirmed: true with the create-time confirmation token. Type manual.
Built for agents.
Name the parties, amount, deadline, fallback, and proof condition.
Use USDC on Base, USDG on X Layer, or the x402/MPP rail endpoint. Stripe is sandbox on-ramp testing.
Poll or push the agreed proof: HTTP, GitHub, file hash, manual attestation.
Automatic for deterministic conditions when payout details are registered. Manual when the condition is subjective.
Post a signed payout notification or explicit confirmation id.
Return condition_met, settlement_pending, settled, refunded, disputed, expired, or still held.
This is narrower than a wallet or PSP. It is the condition engine and settlement commitment on top of whatever rail the agent can use.
The skill is a Markdown contract any agent can read in one shot.
For coding agents with shell access.
/skill.md
/openapi.json · /llms.txt · /agents.txt
Canonical paths. No registry, no signup. The protocol is the discovery.
Worked contracts for GitHub, API, file delivery, and manual attestation. Built for agent marketplaces and crawlers.
→ 303 hosted Stripe Checkout
Demo-only until live Stripe is activated. Stablecoin escrow is the live v0.1 settlement path.
→ 402 accepts: usdc/base · usdg/xlayer
→ 200 with Link SPT credential
One URL for URL-pay wallets. Stablecoin accepts are primary. Stripe Link/SPT stays sandbox until live Stripe is activated.
rail X Layer USDG
status planned adapter
Not live yet. The shape matches: quote, fund, verify, settle, dispute. The adapter waits for a public escrow message format.
What works today.
Settle creates a contract, takes funding, watches a condition, and records settlement. It runs on Cloudflare Workers and D1.
Stablecoin escrow is live for v0.1: USDC on Base and USDG on X Layer. x402 and MPP expose the payment surface. Stripe Checkout / Link is sandbox on-ramp testing, not the primary production rail yet.
The first useful flows are concrete: pay when an API returns the expected response, when a GitHub PR merges, when a file hash matches, or when a client confirms a milestone.
v0.1 is still custodial. Use tiny amounts. It is not a money transmitter, not insured, and not financial advice.
Things Settle refuses to be.
- NOTa walletit doesn't hold keys or sign transactions for you
- NOTa PSPStripe and the chain do the actual money movement
- NOTa marketplaceparties find each other off-platform; Settle just settles between them
- NOTan arbitratordisputes are escalated to the parties, not resolved here
- NOTregulatedno MTL, no banking charter; production requires the real work
- NOTinsuredtreat v0.1 as test capital only
- NOTa chainruns on Cloudflare Workers; chain is one settlement option
- NOTVC-fundedone person, kitchen table, no growth quota
- NOTforever v0.1if the primitive earns its keep, the regulatory work follows
Common questions.
- Q.01Is this production ready?
- No. v0.1 is a working test deployment on a personal domain. Small amounts only. Use it to design integrations and run end-to-end tests.
- Q.02What's the take rate?
- Gas reserve tip defaults to 0%. If the payer opts in, it is added to the funding total and used to keep the operator vault funded for gas. Provider payout stays the escrow amount.
- Q.03What chains and rails are supported?
- USDC on Base and USDG on X Layer are the primary v0.1 rails. x402 and MPP expose rail discovery and payment. Stripe Checkout / Link is sandbox on-ramp testing until live Stripe is activated.
- Q.04What happens if a condition never resolves?
- The deadline runs out and the fallback executes, usually return_to_client. If the fallback is release_to_provider, the contract enters settlement_pending until payout confirmation.
- Q.05Can I add a new condition type?
- Yes. Write a verifier and register it. The verifier returns whether the condition passed and records evidence. v0.1 uses HMAC-SHA256 webhook signatures; v0.2 should publish an ed25519 public key for agent verification.
- Q.06Where are worked examples?
- /examples has copyable recipes for GitHub PR merge, API response, file delivery, and manual attestation. /.well-known/agent-catalog.json exposes a marketplace-friendly listing.
- Q.07Is Settle a wallet, a PSP, or a marketplace?
- None of the above. Settle is the condition engine and settlement commitment that sits on top of whatever rail moves the money.
- Q.08What does the API look like?
- Core calls: create_escrow, fund_escrow, claim_payout, verify_condition, authorize_release, confirm_payout, release_status. Deterministic verification can auto-authorize payout when provider-claimed payout details are registered. Full OpenAPI at /openapi.json.
- Q.09How is Settle different from x402 deferred?
- x402 exact is pay now to access a resource. x402 deferred is sign now, settle later, but doesn't say when settlement is allowed to fire. Settle is the condition layer that decides. x402 tells agents how to pay. Settle tells them when payment is allowed to finalize. An x402-deferred server can require commitment into a Settle contract; Settle holds the funds until the verifiable condition passes, then releases.
- Q.10Is this regulated?
- v0.1 is a custodial demo, not a money transmitter. Production would require an MTL or a partnership with a licensed escrow agent.
- settledstl_8f2k…3Rgithub_pr_merged · openai/codex#123410.00 USDG2m ago
- refundedstl_2k9h…7Pdeadline · fallback to client12.00 USDC18m ago
- payout_failedstl_a14d…81Fapi_response · retry queued0.04 USDG41m ago
- settledstl_99cc…ab1manual_attestation · client confirmed15.00 USDG1h ago