UniversalEscrow
DocumentationAPI reference
Checkout

Prepare the seller's refund of an instant payment

No credential required.

POST

https://testnet.universal-escrow.xyz/v1/checkout/{escrowId}/payment-refund-intent

For an INSTANT order in status PAID: returns unsigned calldata for the seller's own wallet — an exact approve of the escrow contract when the wallet's allowance is short, then refundPayment(escrowId, amount) — and names the buyer as recipient. wallet must be the order's seller and amount (atomic units) must be positive and at most the paid amount minus what is already refunded; refused otherwise with details.reason (payment_refund_requires_seller_wallet, refund_exceeds_remaining, payment_refund_requires_instant). The platform fee is not returned. The refund counts once its PaymentRefunded log is confirmed (escrow.payment_refunded webhook).

Authorizations

None

This endpoint takes no credential: the hosted checkout calls it from the buyer's browser, and the escrow id is what grants access.

Path Parameters

escrowIdstringrequired

Headers

x-request-idstringrequired

Body

application/json
walletstringrequired

The seller wallet that will sign — the only wallet the contract accepts a refund from.

amountstringrequired

Atomic units to return to the buyer, as a decimal string. Positive, and no more than the paid amount minus what is already refunded.

Response

201 · application/json