UniversalEscrow
DocumentationAPI reference

Quickstart

Four steps from an API key to money held in escrow. You never handle the buyer's funds, and neither do we — the contract does.

  1. 0:00Get an API key
  2. 0:05Create an escrow
  3. 0:07Send the buyer to the checkout link
  4. 0:13Receive the webhook

Access is pre-release. The base URL for your environment ($ESCROW_API_BASE) is issued with your API key. Amounts are always atomic-unit strings — USDC has 6 decimals, so "1000000" is 1.000000 USDC. See the roadmap for what is and isn't ready.

1. Get an API key

Create a key from your dashboard. Keys are issued per environment (test and live) and the secret is shown exactly once — we store only a hash, so a lost key is replaced, never recovered. Keys authenticate your server; they must never reach a browser. Keep the default scopes: they cover escrows, webhooks and disputes, and scopes cannot be added to a key later (more on keys).

Every API request
Authorization: Bearer esc_test_<prefix>_<secret>

2. Create an escrow

One call, from your server, when your buyer commits to a purchase. You name the seller; you do not need the buyer's wallet — whichever wallet pays at checkout becomes the buyer. The platform fee is computed and fixed at creation, so a fee change never alters a deal already agreed. Every field and option is in Accept a payment.

cURL
curl -sS "$ESCROW_API_BASE/escrows" \
  -H "Authorization: Bearer $ESCROW_API_KEY" \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: order-4417" \
  -d '{
    "amount": "1000000",
    "currency": "USDC",
    "sellerWallet": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
    "externalReference": "order-4417",
    "description": "Order 4417",
    "successUrl": "https://shop.example/orders/4417/paid"
  }'
201 Created
{
  "id": "esc_01M1MD43G9ZRNVVHV25TQ85MCD",
  "status": "CREATED",
  "amountAtomic": "1000000",
  "platformFeeAtomic": "10000",
  "token": { "symbol": "USDC", "decimals": 6 },
  "checkoutUrl": "https://<checkout host>/checkout/esc_01M1MD43G9ZRNVVHV25TQ85MCD",
  "links": { "checkout": "…", "release": "…", "sellerRefund": "…", "buyerRefund": "…" },
  …
}

Send the same Idempotency-Key with the same body and you get the original response back rather than a second escrow — retry a timed-out request safely.

3. Send the buyer to the checkout link

checkoutUrl is the entire handoff. The buyer opens it, sees the amount, fee and recipient before connecting anything, then signs the payment in their own wallet. They need no account with us, and you build no payment UI.

Prefer to keep the buyer on your page? The Pay with crypto button opens the same checkout in a popup. Either way, arriving back at your successUrl proves nothing — the webhook does.

4. Receive the webhook

You get escrow.funded when the payment is confirmed on-chain at the configured depth — not when a transaction hash was submitted. A hash is a claim; the event is evidence. Verify the signature before trusting the body.

Webhook delivery
POST /your/webhook/endpoint
Escrow-Signature: t=1788464991,v1=5f2b...

{
  "id": "evt_01M1MD5Q0N6V7X2Y3Z4A5B6C7D",
  "type": "escrow.funded",
  "apiVersion": "2026-07-01",
  "createdAt": "2026-09-03T12:29:51.000Z",
  "organizationId": "org_01M1MCZ8H2K3J4N5P6Q7R8S9T0",
  "data": { "escrowId": "esc_01M1MD43G9ZRNVVHV25TQ85MCD", "status": "FUNDED", ... }
}

How to verify the signature — a few lines in any language, or one call with the SDK. Deliveries retry on failure and can be replayed from the dashboard.

What happens next

When the work is accepted, the buyer releases the funds on the hosted release page (links.release) and the contract pays the seller directly, minus the 1% fee. If something goes wrong, the seller can refund or either side can open a dispute — see release, refunds and disputes. Paying in stages? Use milestones. Full endpoint list in the API reference.