Escrow for machine payments

x402 pays before delivery.

Recourse gets the money back.

An agent pays for an API call, and the response is empty, stale, or quietly wrong. The money is already gone. Recourse holds the payment in escrow, settles the argument inside a trusted enclave, and refunds the buyer when the seller broke a promise it published.

Powered byHedera·Chainlink CRE·Bazantic
Buyer agentpaysEscrowholds the paymentREJECT · 102Seller paidBuyer refunded

The missing step

Autonomous payments have a missing step

x402 is a clean way for an agent to pay for an HTTP request. It works, and it has one hole: the money moves before anyone has looked at what came back.

x402 today

  1. Request

    agent calls the API

  2. 402

    price quoted

  3. Pay

    money leaves the agent

  4. Response

    whatever comes back

  5. No recourse

    the money is already gone

Settlement is final the moment it happens. There is no step that asks whether the response was worth paying for.

With Recourse

  1. Request

    agent calls the API

  2. 402

    price + SLA hash

  3. Pay

    into escrow, not the seller

  4. Deliver

    response + signed receipt

  5. Verify

    checked against the SLA

Release

clauses held

Refund

a clause broke

One extra step, and the money waits behind it. Everything else — the header, the facilitator, the seller's code — is unchanged.

What happens when the response is wrong?

A human notices and stops buying. An agent making a thousand calls an hour does not notice, has no refund path, and keeps paying until somebody reads a log. These are the six the demo service can produce on demand — every one is caught by a clause the seller published in advance.

  • Wrong value

    "bid": -1

    caught by clause 2 · $.bid > 0

  • Out of tolerance

    "spreadBps": 900

    caught by clause 4 · ≤ 50

  • Stale data

    "asOf": 40s ago

    caught by clause 5 · freshness

  • Missing field

    no "ask"

    caught by required field

  • Not even JSON

    <html>…

    caught by malformed body

  • Wrong type

    "bid": "cheap"

    caught by clause 2 · not numeric

See it work

Watch a payment get protected, disputed and settled

Both of these are replays of payments that actually happened on testnet. Every hash is on a public explorer — the pacing is theatre, the facts are not.

Lifecycle

One paid request, start to finish

  1. 01

    Terms before money

    The seller publishes a machine-checkable SLA and quotes its hash in the 402. The buyer refuses to pay for terms that do not match their own advertised hash.

  2. 02

    Payment lands in escrow

    Settlement goes to a contract on Hedera, not the seller. The buyer binds that deposit to the exact terms on-chain, and the seller checks the binding before doing any work.

  3. 03

    The seller signs what it sent

    A signature over the response hash comes back with the data. The hash is fixed by the seller and the bytes come from the buyer, so neither side can fabricate the evidence later.

  4. 04

    A dispute is judged, not argued

    The buyer posts a bond. A Chainlink CRE enclave re-reads the payment from chain, pulls the evidence over confidential HTTP, and evaluates the SLA deterministically.

  5. 05

    The verdict settles itself

    Only the payment id, outcome and reason code leave the enclave. CCIP carries them to Hedera, where the escrow pays the winner. Once adjudication starts, the attested verdict and the settlement run without either party controlling the outcome.

The uncontested path never touches an oracle. Funds sit for a short window, the seller withdraws, and the whole exchange costs one extra contract call. Adjudication is the exception, and only the exception pays for it.

Verified on testnet

Both paths, with transaction hashes

Not a mockup. These are real payments, a real enclave verdict, and money that actually moved.

REJECT · reason 102bad response

Buyer refunded 0.11 HBAR

The seller returned a negative bid. Reason 102 is offset 100 plus clause 2 — numeric.gt on $.bid. The refund names a published promise, not an opinion. The bond came back too, because the buyer was right.

Payment
0xc79c411d…790991
Verdict on Sepolia
0x98d8c558…f72ec7
CCIP message
0xa4fb4823…21db84
APPROVEhonest response

Seller paid 0.1 HBAR

All five clauses held, so there was nothing to dispute. The window lapsed and the seller withdrew in a single call — no oracle, no adjudication, no cross-chain hop. This is the common case, and it is deliberately the cheapest one.

Payment
0xb77fa6bf…c5bb6a
Release
0x7fbd0eb1…73316a
Oracle cost
none

Guarantees

What holds, and why

Neither side can lie about the delivery

The seller fixes the hash by signing it; the buyer supplies the bytes. A dispute is only judged on merit once the two agree, so no witness has to be paid and neither party has to be trusted.

The judge cannot be a language model

An enclave result is attested and verified by consensus, which requires the same input to produce the same output every time. So the model helps author the SLA up front, and the enclave enforces a contract both sides already signed.

The rules are public, the data is not

The workflow binary is handed to the enclave and is auditable by anyone. Only the disputed payload stays sealed. That is the right way round: you should be able to check the rules and still keep your data private.

A stalled dispute still resolves

If no verdict ever arrives, anyone can settle the payment after a timeout and the buyer is made whole. Every state has a way out, including the one where the adjudicator itself fails.

Every x402 service has this hole

If you are building one, the buyer on the other end has no way to get its money back today. Closing that takes one change to where the payment goes.