UniversalEscrow
DocumentationAPI reference
Escrows

Register refund transaction

Registers a refund transaction hash the buyer's wallet already broadcast.

POST

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

Prerequisite: the escrow must be FUNDED (a refund-intent should normally precede this). Reaches REFUNDED only once the chain confirms it. Supports Idempotency-Key.

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

Headers

Idempotency-Keystring

Optional, 8–255 characters. The same key with the same body replays the original response instead of acting twice; with a different body it is a conflict.

Body

application/json
transactionHashstringrequired

The 0x-prefixed 32-byte transaction hash the user's wallet broadcast. Untrusted input — verified against the chain on nine properties before any state changes; never taken on faith.

chainIdnumberrequired

Chain id the transaction was sent on; must match the escrow's own chain.

Response

201 · Escrow · application/json

The escrow, now REFUND_SUBMITTED.

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