---
title: "Escrow"
description: "Hold an order's money, then release it to the seller or refund it."
---

Escrow is **your instruction for your order**: the money waits until you say "delivered" (release) or "not delivered" (cancel, which refunds it). It is not a Storspay hold; Storspay never holds live payouts or transfers.

## Hold

You can create an escrow hold directly via `POST /v1/escrows` or as a transfer with `escrow` via `POST /v1/transfers`:

```bash
curl -X POST https://api.storspay.com/v1/escrows \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "seller@example.com",
    "amount": "34.34",
    "currency": "USD",
    "clientRef": "order-1001",
    "description": "Order #1001 escrow hold"
  }'
```

Or via `POST /v1/transfers`:

```bash
curl -X POST https://api.storspay.com/v1/transfers \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": { "accountId": "acct_buyer…" },
    "to": { "accountId": "acct_seller…" },
    "amount": { "amount": "34.34", "currency": "USD" },
    "escrow": { "holdUntil": "2026-12-31T12:00:00Z" },
    "clientRef": "order-1001"
  }'
```

The transfer is `held` (`transfer.held`). The money leaves the buyer's available balance and shows as `inEscrow`.

- `from` and `to` are `{ "kind": "platform" }` (your own balance) or `{ "accountId": "acct_…" }` (one of your account holders).
- A transfer moves money in one currency. To change currency, convert first with a quote.
- `escrow.holdUntil`: the money is refunded automatically after this time (default 14 days, at most 30). In the sandbox it can be as short as 60 s.

## Release

Release a held escrow to the seller via `POST /v1/escrows/{id}/release` or `POST /v1/transfers/{id}/release`:

```bash
curl -X POST https://api.storspay.com/v1/escrows/hp_0123456789abcdef01234567/release \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json"
```

The money goes to `to` (`transfer.released`).

## Cancel (refund)

Cancel a held escrow via `POST /v1/escrows/{id}/cancel` or `POST /v1/transfers/{id}/cancel`:

```bash
curl -X POST https://api.storspay.com/v1/escrows/hp_0123456789abcdef01234567/cancel \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json"
```

The money returns to the payer's balance (`transfer.refunded`). A release or cancel on an escrow that is not `held` returns `409 STATE_CONFLICT`.

## Cash-out

Sellers or platforms can cash out balance funds via `POST /v1/cash-outs`:

```bash
curl -X POST https://api.storspay.com/v1/cash-outs \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "50.00",
    "currency": "USD",
    "beneficiaryId": "ben_seller_bank",
    "clientRef": "cashout-001"
  }'
```

## Production guard: HTTP 409 `not_enabled`

While held payments are guarded off (pending partner ledger slice 2b and its Ops switch on production), calls to `/v1/escrows`, `/v1/transfers`, and `/v1/cash-outs` return HTTP 409 `{ "code": "not_enabled", "message": "Held payments are not enabled on this environment." }`. No money moves until slice 2b and the Ops toggle are live. The live-check contract is verified continuously by live-check row `ESCROW-1278C`.

## Required API Key Scope

Requests to escrow, transfer, and cash-out routes require an API key carrying the `create:transfers` (or `create:payouts`) scope. Audit checks use `read:ledger`.

## Platform fee

Your platform fee is a separate line **on top**: it is paid from the escrowed amount to you at release, never taken from the seller's price, and refunded with the rest if you cancel. See the [marketplace guide](/guides/marketplace-escrow).

## September v1 API escrow

On the September v1 API, escrow is on the payout: `POST /payouts` with `escrow: true` (when escrow is enabled for your account; otherwise `403 escrow_not_enabled`). The payout is `held` with `holdExpiresAt` 14 days later. `POST /payouts/:id/release` starts it (`released` → `processing` → `completed`); `POST /payouts/:id/cancel` refunds the amount and the fee (`refunded`). Release or cancel on a payout that is not held returns `409 not_held` with `currentStatus`. After 14 days a held payout is refunded (`escrow_timeout_14d`).
