UniversalEscrow
DocumentationAPI reference
Escrows

Cancel escrow

Cancels an escrow before it is funded.

POST

https://testnet.universal-escrow.xyz/v1/escrows/{escrowId}/cancel

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.

Authorizations

Authorizationstringheaderrequired

Bearer authentication with your secret API key: Bearer esc_test_<prefix>_<secret>. The key needs the escrows:write scope.

How authentication works

Path Parameters

escrowIdstringrequired

Body

application/json
reasonstring

Free-text reason for the cancellation, for audit/support purposes.

Response

201 · Escrow · application/json

The cancelled escrow.

idstringrequired

Public id.

organizationIdstringrequired
statusEscrowStatusrequired
settlementModeSettlementModerequired

One of ESCROW, INSTANT.

refundedAmountstring | nullrequired

INSTANT orders: the total the seller has refunded to the buyer, from confirmed refunds only, as an atomic-unit string. Null for ESCROW orders.

refundStatestring | nullrequired

INSTANT orders: whether the seller has refunded none, part or all of the payment. Null for ESCROW orders. One of NONE, PARTIAL, FULL.

environmentstringrequired

Inherited from the creating API key. One of test, live.

chainIdnumberrequired
onChainIdstring | nullrequired

Deterministic on-chain id, knowable before the escrow exists on chain; every escrow.* event correlates on it.

contractAddressstring | nullrequired
tokenTokenrequired
amountAtomicstringrequired

Atomic-unit decimal string; 1 USDC is "1000000".

platformFeeAtomicstringrequired

Atomic-unit decimal string, snapshotted at creation.

partiesEscrowParty[]required
externalReferencestring | nullrequired

Your own reference, exactly as sent.

sellerWalletIdstring | nullrequired

The verified seller wallet (swal_…) the seller address was taken from; null when created with a raw sellerWallet.

groupIdstring | nullrequired

The milestone group this escrow belongs to, or null when it was created alone.

groupPositioninteger | nullrequired

The escrow's 1-based position within its milestone group, or null when it was created alone.

descriptionstring | nullrequired

What is being paid for, shown to the buyer.

successUrlstring | nullrequired

Where the buyer may return after paying.

cancelUrlstring | nullrequired

Where the buyer may return without paying.

metadataobjectrequired

Your own key/value pairs, exactly as sent.

expiresAtstring | nullrequired

When the buyer may refund a funded escrow themselves. RFC 3339.

fundingDeadlinestring | nullrequired

When an unfunded escrow expires. Defaults to expiresAt. RFC 3339.

fundingEvidenceFundingEvidence | nullrequired
createdAtstringrequired

RFC 3339 UTC timestamp.

updatedAtstringrequired

RFC 3339 UTC timestamp.

checkoutUrlstring

Hosted checkout page for the buyer. Absent when the deployment has no checkout base URL.

linksEscrowLinks