escrow api · agent-discoverable · v0.1

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.

skill for your agent
$ curl -fsSL settle.ronakdaya.com/skill.md 
    | claude
Paste this into Claude, Codex, or any coding agent with shell access. The skill file is the integration contract.
built on x402 MPP Stripe sandbox USDC · USDG Cloudflare Workers
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.

02 / why

Invoices weren't built for software.

x402 and MPP are good at pay-to-access. Work needs pay-when-done: commit funds, verify the condition, then settle or refund.
the old wayinvoice + trust
  1. 01Work is deliveredNo commitment that payment will arrive.
  2. 02Invoice is sentHuman-readable, machine-opaque. PDFs, emails, sometimes terms.
  3. 03Net-30 waitFunds sit on the seller's balance sheet as receivables. Sometimes Net-60. Sometimes never.
  4. 04Dispute or chaseHuman-resolved. Lawyers, Slack threads, threats of small-claims court.
  5. 05Payment lands (maybe)Plus chargeback risk for 60–120 days.
the Settle waycommit + verify
  1. 01POST /escrow/createParties, amount, deadline, condition, fallback. JSON in, contract id out.
  2. 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.
  3. 03Settle verifiesHTTP poll, webhook, file hash, manual attestation. The condition is the SLA.
  4. 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.
03 / who uses it

Bounties, agents, freelancers, APIs.

Same contract object. Different parties. Different rails.
id
who
signal
amount
state
001
human ↔ agent
TYPE: API_RESPONSE
api response checks · latency < 800ms
10.00USDG
held
002
maintainer ↔ contributor
TYPE: GITHUB_PR_MERGED
github_pr_merged · openai/codex#1234
25.00USDG
held
003
client ↔ freelancer
TYPE: FILE_DELIVERED
file_delivered · sha256 match
20.00USDG
settled
004
consumer ↔ api
TYPE: API_RESPONSE · PER CALL
response.ok && schema.valid
0.0008USDG/call
held
04 / how it works

The lifecycle.

Two parties name an amount, a deadline, and a verifiable condition. Settle holds the funds, verifies the condition, and settles only after payout confirmation.
05 / mechanism

Inside a contract.

A contract is JSON. Parties, amount, deadline, condition, fallback. Settle verifies the condition and moves money, or runs the fallback if the deadline expires. Public states and terminal states are named in /skill.md.
01

create

Define parties, amount, deadline, fallback, and verification condition. Starts in pending_funding.

02

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.

03

watch

Settle verifies the condition. HTTP polling, webhook, file hash, or manual attestation. Audit log per contract.

04

resolve

Pass → settled. Deadline first → fallback runs. Terminal states are settled, refunded, expired, and disputed.

POST /escrow/create · HTTP 1.1
// 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" }
state machinepublic states · terminal states · see /skill.md
payout webhook payloadPOST /webhooks/payout · HMAC-SHA256 in X-Settle-Payout-Signature
// 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"
  }
}
06 / funds

What happens to your funds.

v0.1 is intentionally narrow. Funds are committed to a contract, held by the operator vault, and moved only through the contract state machine.
01

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.

02

Verification gates settlement.

Objective signals can auto-authorize payout. Manual attestation still requires a human confirmation.

03

Settlement needs a receipt.

Settle marks settled only after payout confirmation or a signed payout webhook records the transfer.

04

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.

05

Fallbacks are explicit.

If the deadline wins, the contract follows its fallback: usually refund to client, sometimes release to provider.

06

Every transition is logged.

State changes emit an audit event and can be delivered to subscribers by signed webhook.

06 / signals

Supported conditions.

Each is a verifier function that returns whether the condition passed and what proved it.
http

API response checks.

GET /v1/result  →  200 · schema · latency<800

The most common signal. Used for agent-to-agent and metered API contracts. Type api_response.

github

Pull request merged.

github/openai/codex#1234  →  merged

For bounties on public work. The proof is the merge. Type github_pr_merged.

file

File at URL with hash.

sha256 4f1c…9d3a · < 24h after fund

For freelance and deliverable-based work. The condition passes when the file at the URL matches the hash. Type file_delivered.

manual

Manual attestation.

POST /escrow/{id}/verify  {"confirmed":true}

When no machine signal exists. The client posts confirmed: true with the create-time confirmation token. Type manual.

07 / for agents

Built for agents.

No SDK. No signup. Read the skill file once and integrate.
agent transaction loop
01
create_escrow

Name the parties, amount, deadline, fallback, and proof condition.

02
fund_escrow

Use USDC on Base, USDG on X Layer, or the x402/MPP rail endpoint. Stripe is sandbox on-ramp testing.

03
verify_condition

Poll or push the agreed proof: HTTP, GitHub, file hash, manual attestation.

04
authorize_release

Automatic for deterministic conditions when payout details are registered. Manual when the condition is subjective.

05
confirm_payout

Post a signed payout notification or explicit confirmation id.

06
release_status

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.

tell your agent to:
Read settle.ronakdaya.com/skill.md and create an escrow that settles when my PR is merged.

The skill is a Markdown contract any agent can read in one shot.

or run:
$ curl -fsSL settle.ronakdaya.com/skill.md | claude

For coding agents with shell access.

discovery
/.well-known/mpp.json
/skill.md
/openapi.json · /llms.txt · /agents.txt

Canonical paths. No registry, no signup. The protocol is the discovery.

examples

Worked contracts for GitHub, API, file delivery, and manual attestation. Built for agent marketplaces and crawlers.

human checkout · sandbox
POST /escrow/{id}/checkout
303 hosted Stripe Checkout

Demo-only until live Stripe is activated. Stablecoin escrow is the live v0.1 settlement path.

x402 facade
POST /escrow/{id}/pay
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.

APP compatibility
quote → escrow → verify → settle
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.

⊢ works with Claude mppx x402 MPP OKX APP policy wallets any HTTP client
08 / status

What works today.

A live test deployment. Small amounts only. Built to test whether pay-when-done is useful for agents, APIs, and contract work.

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.

version0.1.0
infracloudflare workers
positionconditional settlement layer
fundingusdc/base · usdg/x layer · walletconnect · x402 · mpp · stripe sandbox
payoutsbase usdc · x layer usdg · deterministic auto-authorization
compatibilityx402 · mpp · stripe link sandbox · okx app planned
signalshttp · github · file · manual · stripe · onchain
status● operational
08b / scope

Things Settle refuses to be.

v0.1 stays narrow. The list below is what Settle won't do until v1 earns it.
  • 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
09 / faq

Common questions.

Short answers. If something isn't covered, email hi@ronakdaya.com.
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.
⊢ live · recent contractscycling · synthetic v0.1 sample
  • 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

Funds settle only after the condition is verified.

v0.1 · personal test deployment · usdc/base · usdg/x layer · x402/mpp · stripe sandbox try the funding demo → read /skill.md → read the launch post →
settle · programmable escrow
Operated by Ronak Daya. Personal test deployment. Not an official product of Stripe, Paxos / Global Dollar Network, Coinbase, WalletConnect, or Visa. Names are referenced for compatibility only.