Skip to main content
POST
Seller Financing is in beta and runs on Ethereum Sepolia instances only for now (DEVELOPMENT instances on Ethereum). A PRODUCTION instance, or one on another network, answers 503 SELLER_FINANCING_UNAVAILABLE. See Seller Financing.
Builds the unwind of a REPAID sale on a market that runs delivery against payment. See Market generations. The market holds the downpayment and the principal of a paid sale until the asset is delivered. When it is not delivered within 30 days after the payoff, the sale can be unwound:
  • The buyer can unwind it once the asset cannot be delivered.
  • A wallet that holds OPERATOR_ROLE can unwind it in any case.
The unwind credits the held payment to the buyer, who withdraws it with Withdraw, and the listing reads UNWOUND. The interest the buyer paid stays with the seller. The lock is released: in freeze mode the freeze in the seller’s wallet is lifted up to what the seller’s other live sales on the market do not need, and nothing while the freeze adapter lacks the agent role on the token. In custody mode the adapter returns to the seller at most what it holds. An unwind stays open while the market is paused. A sale paid off before the market moved to delivery against payment has no held payment: the seller was credited at that payoff, and the sale cannot be unwound. The answer is 409 TX_WOULD_REVERT with NoHeldPayment. Before building, the API checks, in order:
  1. The market runs delivery against payment and has recounted its live sales. Otherwise the answer is 409 MARKET_UPGRADE_REQUIRED or 409 MIGRATION_PENDING.
  2. The listing is REPAID.
  3. The market holds a payment for the sale (heldPayment(id)). Otherwise 409 TX_WOULD_REVERT with NoHeldPayment.
  4. The delivery period has passed, measured against the time of the latest block. Before unwindableAt the answer is 409 DELIVERY_PERIOD_RUNNING with details.unwindableAt.
  5. Unless from holds OPERATOR_ROLE: from is the buyer, otherwise 409 TX_WOULD_REVERT with NotBuyer, naming the buyer and the operators. And the asset cannot be delivered (isDeliverable(id) is false), otherwise 409 ASSET_DELIVERABLE: the buyer claims the asset with Claim Asset instead.
A read that fails answers 503 CHAIN_UNAVAILABLE and never a verdict. The unwind is then simulated from from.

Path Parameters

string
required
The market’s record ID, as id on List Markets.
string
required
The listing’s ID on the market.

Body Parameters

string
required
The wallet that signs: the buyer of the listing, or a wallet that holds OPERATOR_ROLE on the market. Without it the answer is 400 FROM_REQUIRED.

Response Fields

object

Error Codes