Skip to main content
POST
Open an escrow and return the approval to sign

Authorizations

Authorization
string
header
required

Platform access token from POST /auth/token, carrying the platform audience and the developer_key_id of the registration that minted it. It acts as your own account; name a client you created with X-Hevn-Account: cl_…. Every request re-checks that the registration is still active and that the caller's source IP is inside its allowlist. A token is valid only against the server that issued it, so sandbox tokens are refused in production and production tokens in the sandbox.

Headers

X-Hevn-Account
string | null

The client account to act for, as a cl_… id. Omit it to act as yourself.

Example:

"cl_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41"

x-api-key
string | null
Idempotency-Key
string | null

Your own key for this write, ^[A-Za-z0-9._:-]{1,128}$. A retry with the same key replays the first answer; the same key with a different request is refused.

Example:

"po-inv-2026-114"

Body

application/json
senderClientId
string
required

Account funding the escrow.

Pattern: ^(?:cl_)?[A-Za-z0-9._:\-]{1,216}$
Example:

"cl_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41"

receiverClientId
string
required

Account entitled to receive captured funds.

Pattern: ^(?:cl_)?[A-Za-z0-9._:\-]{1,216}$
Example:

"cl_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41"

token
string
required

Digital asset held in escrow.

Required string length: 1 - 16
Example:

"USDC"

maxAmount
string
required

Maximum token amount that may be authorized.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
Example:

"500.00"

approveWithin
string
default:1h

Time allowed for the sender to approve funding.

Pattern: ^\d{1,4}[smhd]$
Example:

"14d"

holdFor
string
default:14d

Time captured funds remain held after approval.

Pattern: ^\d{1,4}[smhd]$
Example:

"14d"

refundableFor
string
default:90d

Time during which a refund remains available.

Pattern: ^\d{1,4}[smhd]$
Example:

"14d"

feeBps
integer
default:0

Variable fee in basis points; 100 basis points equals 1 percent.

Required range: 0 <= x <= 10000
reference
Reference · object

Caller reference stored with the escrow.

Response

OK

id
string
required

Stable public identifier for this escrow.

status
enum<string>
required

Current public lifecycle status of the escrow.

Available options:
draft,
authorized,
charged,
partiallyCaptured,
captured,
voided,
reclaimed,
partiallyRefunded,
refunded
availableActions
enum<string>[]
required

Actions permitted by current state and deadlines.

Available options:
approve,
authorize,
charge,
capture,
reject,
void,
reclaim,
refund
sender
EscrowPartyView · object
required

Account sending or authorizing escrow funds.

receiver
EscrowPartyView · object
required

Account entitled to captured escrow funds.

token
string
required

Digital asset held in escrow.

maxAmount
string
required

Maximum token amount that may be authorized.

Example:

"500.00"

authorizedAmount
string
required

Token amount currently authorized for capture.

Example:

"500.00"

capturableAmount
string
required

Token amount that may currently be captured.

Example:

"500.00"

refundableAmount
string
required

Token amount that may currently be refunded.

Example:

"500.00"

windows
EscrowWindowsView · object
required

Approval, holding and refund deadlines.

createdAt
string<date-time>
required

UTC timestamp when the escrow was created.

updatedAt
string<date-time>
required

UTC timestamp when the escrow was last updated.

action
EscrowActionView · object | null

Latest prepared or submitted escrow action.

consistent
boolean | null

Whether persisted state matches the latest chain state.