Fund Escrow
Deposit funds into a deployed escrow, locking them until the agreed conditions are met.
Builds the unsigned transaction that moves tokens from the funder's wallet into the escrow contract. Any wallet holding the escrow's trustline asset can fund; the signer is the wallet paying.
Endpoint
Deployed v2 escrow contract to fund (C...).
CDHAZ2RTE2MDHYQQ7NATF5IVKIFVGLX6FHJ66OPK6MUXBSTRRXFXJ6QBWallet depositing the funds — signs the transaction.
GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVNAmount in human-readable decimals (e.g. 10 = 10 USDC).
1000Unsigned XDR built successfully.
Base64-encoded unsigned XDR. Sign it with the appropriate wallet and submit to Soroban / Horizon to execute the operation on-chain.
AAAAAgAAAAAtWsgedQ...AAAAAQAAAAA=SHA-256 hash of the prepared transaction. NOTE: it only matches the executed transaction if you sign the XDR exactly as returned — re-preparing (re-simulating) it changes the hash. Prefer contractId for correlation when present.
b1946ac92492d2347c6235b4d2611184a8d53f7a8e6e9b4f0c79a2b30e5c4f3aDeploys only: the address (C…) the new escrow contract WILL have once this transaction executes — known upfront because the service generates the deploy salt. Track your escrow with it (e.g. GET /escrows/:contractId) as soon as the transaction lands; it is stable even if your wallet/SDK re-prepares the transaction.
CAAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQC526Request body or query params fail schema validation (wrong type, missing required field, unknown property).
Missing, malformed, expired, revoked or invalid API key.
API key is valid but does not have the role required for this operation.
Payload is well-formed but a business rule rejects it (e.g. amount out of range, role not allowed for this user).
Unexpected server-side failure. Use the traceId to look up the incident in server logs or contact support.
POST /escrow/single-release/v2/fund HTTP/1.1
Host: beta.api.trustlesswork.com
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 155
{
"contractId": "CDHAZ2RTE2MDHYQQ7NATF5IVKIFVGLX6FHJ66OPK6MUXBSTRRXFXJ6QB",
"signer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
"amount": 1000
}{
"unsignedXdr": "AAAAAgAAAAAtWsgedQ...AAAAAQAAAAA=",
"txHash": "b1946ac92492d2347c6235b4d2611184a8d53f7a8e6e9b4f0c79a2b30e5c4f3a",
"contractId": "CAAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQC526"
}Field notes
amountis in human token units (e.g.10= 10 USDC) and must be greater than zero.The funder needs a trustline to the escrow's asset and enough balance; otherwise the transaction fails on-chain, not at build time.
What this endpoint returns
unsignedXdr + txHash — the same contract as every build endpoint: sign the XDR exactly as returned and submit it via Send Transaction. Full build → sign → submit example on the Deploy page.
Next steps
Track the deposit:
GET /escrows/{contractId}— deposits appear in the escrow'sdepositstrail.Move work forward: Change Milestone Status
Last updated