UniversalEscrow
DocumentationAPI reference

Authentication

Your server authenticates every request with a secret API key in the Authorization header. Keys belong to one environment and carry the scopes you chose when you created them.

API keys

Every API request
curl "$ESCROW_API_BASE/escrows?limit=5" \
  -H "Authorization: Bearer $ESCROW_API_KEY"
  • Format: esc_test_<prefix>_<secret> or esc_live_…, sent as Authorization: Bearer <key>. We store the prefix to find the key and only a hash of the secret.
  • Shown once. Copy the secret when you create the key. A lost key is replaced, never recovered.
  • Created in the dashboard only. A key cannot create another key. Test keys work straight away; a live key needs a verified email address and two-factor authentication on the account creating it.
  • Rotating: create a new key, deploy it, then revoke the old one.

Server-side only. A key can create escrows and read every payment in its environment. Never put it in a browser, a mobile app or version control. The API refuses an Authorization header from any browser origin, so a key used from front-end code fails anyway.

Test and live

A test key sees only test escrows, webhook endpoints and seller wallets; a live key only live ones. An id from the other environment answers 404, exactly like an id that does not exist. Every escrow carries an environment field — check it in your webhook handler before you mark an order paid.

Scopes

Each endpoint needs exactly one scope. The dashboard ticks all six by default; scopes cannot be added to an existing key, so to add one, create a new key and revoke the old. This table is generated from the API description.

Endpoints that take no credential

The hosted checkout is what a buyer's browser talks to, and a buyer has no account. Those endpoints take no key and no cookie: knowing the escrow id is what lets someone see and pay it, and every transaction is still signed by the buyer's own wallet. Treat a checkout link like an invoice link — share it with the buyer, not publicly.

Checkout: 11 endpoints.

The seller wallet verification page works the same way, with a single-use link token instead of an id.

Authentication errors

StatusCodeMeaning
401authentication_requiredNo key, or a malformed, revoked or wrong-environment one.
403insufficient_scopeThe key lacks the route's scope; details.requiredScope names it.
404resource_not_foundThe id belongs to another organization or the other environment — indistinguishable from not existing.

Next