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 a repayment on an ACTIVE loan: an exact approval on the payment token, then repay. Any wallet can repay any active loan, and the payment is booked to the loan. from is the payer. The market applies a payment in this order:
  1. The repay fee is carved out of it: the smaller of the market’s repayFee and 0.5 percent of the amount applied.
  2. The rest settles the interest due up to the moment of payment.
  3. What remains reduces the principal and is held in escrow until the loan completes or is liquidated.
The seller is credited its share of the interest at once, and Trusset 20 percent of it. Interest cannot be paid in advance. To pay a period on time, see Paying a period on time. The payment that brings the principal to zero closes the loan. The listing reads REPAID, the seller is credited the full price, and the buyer can claim the asset with Claim Asset.

When the asset cannot be delivered

Before building, the API checks the listing’s asset leg and returns it as assetLeg. See Asset leg. While the asset can no longer be delivered to the buyer (assetLeg.deliverable: false), a repayment that would complete the loan, amount: "full" or an amount at or above the payoff, is refused with 409 ASSET_NOT_DELIVERABLE: it would credit the seller the full price while the delivery to the buyer reverts. A partial repayment still builds, and carries the leg’s text in warning. A leg that could not be read (checked: false) never refuses a repayment.

Paying off in full

With amount: "full", the API reads the payoff now and approves it plus a 0.5 percent margin and one smallest unit, for the interest that accrues until the payment is mined. The market takes the payoff at the moment of mining and never more than the approved amount. A last step resets the allowance to zero, so no unused margin stays approved.
If the transaction is mined much later than it was built, the margin may not cover the interest accrued meanwhile. The payment then applies in full and the loan stays ACTIVE with a small remainder. Read Get Loan Status after mining and pay the remainder.
An amount at or above the payoff is also built as a full repayment, with fullRepayment: true and the closing reset, but without the margin: the approval is exactly amount. An amount equal to the payoff when the request was built will almost always leave a remainder, because interest accrues until the payment is mined. Send "full" to close a loan.

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
"full" to pay off the loan, or the most the payment may take, as a decimal string in whole units of the payment token, for example "128". It must be greater than zero. The market never takes more than the payoff, so an amount above it takes only the payoff.
string
required
The paying wallet, which signs the steps, normally the buyer. It must hold the payoff for a full repayment, otherwise amount. Without it the answer is 400 FROM_REQUIRED.

Response Fields

object
In the partial example, built a day after the first due date, the 128 USDC payment carries a fee of 0.636815 USDC. Of the remaining 127.363185 USDC, 124.330706 USDC settles the interest due and 3.032479 USDC goes to principal, if mined at once.

Error Codes