Endpoints
| Route | Method & path | What it does |
|---|---|---|
| Create escrow | POST /v1/escrow/create | Generates a standard escrow link. multipart/form-data (up to 5 images). Required: amount, purpose, whoPays. Returns id + paymentToken; state: AWAITING_PAYMENT. customer-id = seller. A merchant can’t create an escrow for itself. |
| Edit escrow | PUT /v1/escrow/edit/{paymentToken} | Update amount/purpose/delivery/images. Allowed only while AWAITING_PAYMENT and only by the seller. New images are appended. |
| Delete escrow | DELETE /v1/escrow/delete/{paymentToken} | Removes an unfunded escrow. Allowed only while AWAITING_PAYMENT. |
| Verify payment token | GET /v1/escrow/verify/{paymentToken} | Resolves a link to its full escrow details — used by the buyer to preview before paying. |
| Claim funds | GET /v1/escrow/claim-funds/{paymentToken} | Seller releases funds to themselves. Allowed only when OPENED and the delivery window has elapsed. Closes as CLAIMED. |
| List escrow transactions | GET /v1/escrow/transactions | Paginated escrows for the caller. type (sales or buy) is required. Optional status, categoryId, page, limit. |
How a standard escrow flows
Fund (buyer)
Buyer pays via Pay escrow →
OPENED.