Escrows
Create an escrow, read its state and history, and prepare release, refund or cancellation.
API keyHow to authenticate
- GETList escrows
/v1/escrowsLists escrows for the calling organization, newest first. Filterable by status, buyer wallet and external reference. Cursor-paginated. - POSTCreate escrow
/v1/escrowsCreates an escrow in status CREATED. No prerequisites.description(optional, 1-500 characters) is shown to the buyer on the hosted checkout.successUrlandcancelUrl(optional) are where the buyer may return afterwards: absolute URLs without a username or password, https for a live key (http is also accepted for a test key), otherwise 422validation_failednaming the field; the hosted pages offer them only as links the buyer clicks, carryingescrow_idand nothing else, and arriving at one is not proof of payment — wait for theescrow.fundedwebhook. The response carrieslinks(checkout, release, sellerRefund, buyerRefund) when the deployment has a hosted checkout.buyerWalletis optional: omit it for a "pay from any wallet" escrow, whose buyer is bound when the payer requests funding calldata; supply it to lock the buyer at creation.fundingDeadline(optional, must not be later thanexpiresAt, defaults toexpiresAt) is the payment window: funding cannot be started after it (409funding_window_closed).expiresAtis the refund lock: the moment the buyer may refund themselves.settlementMode(optional, defaultESCROW) chooses how the order settles:ESCROWholds the payment until the buyer releases it;INSTANT(ADR-040) pays the seller and the fee in the buyer's payment transaction and ends inPAIDwith no release, dispute or buyer refund — for goods delivered at payment.INSTANTwithexpiresAtis 422validation_failed(details.reasonexpires_at_not_allowed_for_instant), and on a deployment still running escrow contract v1 it is 422 withinstant_settlement_unavailable. The mode cannot be changed later. The platform fee is computed and snapshotted at creation (100bps, truncated) — anyplatformFeein the body is ignored. SupportsIdempotency-Key(optional; 8-255 characters when sent, otherwise 422validation_failed): the same key with the same body replays the original response; the same key with a different body is a conflict. - GETGet escrow
/v1/escrows/{escrowId}Retrieves one escrow by id. CarriesfundingEvidenceonce funded (transaction hash, block number/hash, log index, confirmations) so a caller can verify the payment on-chain rather than trust the status alone. - POSTPrepare funding transaction
/v1/escrows/{escrowId}/funding-intentReturns unsigned transaction(s) (calldata) for the buyer's own wallet to sign and broadcast — the backend never signs or holds a private key. This call changes nothing on the escrow; the escrow does not advance until the resulting hash is registered and confirmed on chain. Prerequisite: the escrow must be in a pre-funding state (e.g. AWAITING_FUNDING). Body:buyerWallet(optional address) — required when the escrow was created without a buyer, where it is bound as the buyer (replaceable until funding is submitted); must match when the buyer was fixed at creation (409buyer_wallet_mismatch). - POSTRegister funding transaction
/v1/escrows/{escrowId}/funding-transactionsRegisters a transaction hash the buyer's wallet already broadcast. Returns 202, NOT 201 or 200 — the platform has accepted a claim for verification, not confirmed a payment. The escrow becomes FUNDED only once the indexer observes the funding event at the configured confirmation depth (pollGET /v1/escrows/{escrowId}or subscribe to theescrow.fundedwebhook). A verification failure against the chain is422 transaction_verification_failed. Prerequisite: a funding-intent should normally have been requested first, though this route accepts any hash and verifies it independently. SupportsIdempotency-Key. - POSTPrepare release transaction
/v1/escrows/{escrowId}/release-intentReturns unsigned calldata to release a funded escrow to the seller, for the buyer's wallet to sign. Prerequisite: the escrow must be FUNDED. This call does not advance the escrow — it reaches RELEASED only once the chain confirms it. The response'sexpectedRecipientsnames the seller and the fee recipient and how much each receives, from the escrow's own snapshotted amounts. Partial amounts are not supported by the deployed contract (BL-02): the body takes no fields, and any field is refused with 422 — to pay in stages, create a milestone group (POST /v1/escrow-groups). - POSTRegister release transaction
/v1/escrows/{escrowId}/release-transactionsRegisters a release transaction hash the buyer's wallet already broadcast. Prerequisite: the escrow must be FUNDED (a release-intent should normally precede this). The escrow moves to RELEASE_SUBMITTED immediately (a hash was registered) and reaches RELEASED only once the chain confirms it — registering a hash is not confirmation. SupportsIdempotency-Key. - POSTPrepare refund transaction
/v1/escrows/{escrowId}/refund-intentReturns unsigned calldata to refund a funded escrow back to the buyer, for the buyer's wallet to sign. Prerequisite: the escrow must be FUNDED. Refunds charge no platform fee —refundEscrowtransfers the whole amount back — soexpectedRecipientsnames only the buyer. Partial amounts are not supported by the deployed contract (BL-02): the body takes no fields, and any field is refused with 422 — to pay in stages, create a milestone group (POST /v1/escrow-groups). - GETList the seller's refunds of an instant payment
/v1/escrows/{escrowId}/refundsFor an INSTANT order: every refund the seller sent back to the buyer, oldest first, as recorded from confirmedPaymentRefundedlogs. A refund a chain reorganization removed stays listed with status REORGED and no longer counts towardrefundedAmount. Empty for an ESCROW order. - POSTRegister refund transaction
/v1/escrows/{escrowId}/refund-transactionsRegisters a refund transaction hash the buyer's wallet already broadcast. Prerequisite: the escrow must be FUNDED (a refund-intent should normally precede this). Reaches REFUNDED only once the chain confirms it. SupportsIdempotency-Key. - POSTCancel escrow
/v1/escrows/{escrowId}/cancelCancels an escrow before it is funded. Prerequisite: the escrow must not yet be FUNDED — a funded escrow cannot be cancelled through this route, only released or refunded via chain-confirmed evidence.