G

Gateway · Escrow Create

by Gateway

POSTBaseSolana

$0.1

per call · USD Coin on Base

Create conditional escrow with milestones and expiry.

Endpoint

POST https://gateway.spraay.app/api/v1/escrow/create

1

Calls / 30d

1

Unique payers / 30d

Sep 7

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://gateway.spraay.app/api/v1/escrow/create", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "amount": "5000",
    "beneficiary": "0xFreelancer",
    "depositor": "0xClient",
    "token": "USDC"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://gateway.spraay.app/api/v1/escrow/create" \
  -H "Content-Type: application/json" \
  -d '{"amount":"5000","beneficiary":"0xFreelancer","depositor":"0xClient","token":"USDC"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "escrow": {
    "id": "ESC-A1B2"
  },
  "status": "created"
}

Payment details

Pay to0xad62f03c7514bb8c51f1ea70c2b75c37404695c8
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Solana
Schemesexact

Is this your API?

Pin it to the top of AI & Inference and the homepage with a featured placement.

Get featured →

More from Gateway & similar services