settlement infrastructure
for machine commerce.
Settle verifies what happened, determines what was earned, and authorizes when money can become final.
$ curl -fsSL settle.ronakdaya.com/skill.md
| claude
- verify
- determine the agreed outcome
- authorize
- decide the action and exact amount
- settle
- use Settle rails or an external system
Link authorizes how an agent may pay. Settle determines whether—and how much—the counterparty earned.
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.
- 02Reference escrow can hold fundsUSDC on Base or USDG on X Layer powers the optional reference path. x402 and MPP expose rail discovery. Stripe Checkout and the Link agent wallet remain sandbox/external-account gated.
- 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 and the Link agent wallet remain sandbox/external-account gated.
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 and Link agent-wallet SPT funding remain sandbox/external-account gated.
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 remains the reference settlement path.
→ 402 x402 rails or Link MPP challenge
→ 200 held + Payment-Receipt
The official Link CLI uses a user-approved SPT over MPP. Stablecoin accepts remain primary; Link stays sandbox/external-account gated.
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.
External systems can call POST /verify, receive a portable signed OutcomeReceipt, and call POST /authorize for a policy-bound SettlementAuthorization.
Fixed, unitized, milestone, and partial outcomes use decimal-safe economics. INDETERMINATE never releases funds.
The reference escrow consumes the same control modules while preserving Base USDC, X Layer USDG, x402, MPP, payout confirmation, refund, idempotency, and ledger behavior.
The reference escrow remains custodial. Use tiny amounts. It is not a money transmitter, not insured, and not financial advice.
Things Settle refuses to be.
- NOTa walletthe control API holds no keys; the optional reference escrow uses an operator vault to execute authorized test payouts
- 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 reference-escrow funds as test capital only
- NOTa chainruns on Cloudflare Workers; chain is one settlement option
- NOTVC-fundedone person, kitchen table, no growth quota
- NOTfinishedthe control primitive must earn its keep with real workflows
Common questions.
- Q.01Is this production ready?
- The v0.2 control API is implemented and testable, but the hosted service remains a personal test deployment. The reference escrow is custodial and should use small amounts only.
- 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?
- The control API is rail-independent. The reference escrow supports USDC on Base and USDG on X Layer; x402 and MPP expose rail discovery and payment. Stripe Checkout and official Link CLI/SPT funding remain sandbox/external-account gated.
- 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.2 signs portable receipts with Ed25519 and publishes verification keys at /.well-known/settle-keys.json.
- Q.06Where are worked examples?
- /examples has copyable recipes for Cloudflare Agents, 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 control calls are POST /verify, POST /authorize, and POST /evaluate. The reference implementation retains create, fund, verify, payout, refund, and status calls. 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?
- The control API does not take custody. The reference escrow is a custodial demo, not regulated escrow; production money movement would require the appropriate licenses or partners.
- 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