Skip to main content
You can repay a loan in full or in part. Full repayment closes the loan and releases the cirBTC collateral back to your Circle Mint balance. Partial repayment reduces the outstanding debt without closing the loan or releasing collateral. See How Digital Asset-Backed Borrowing works for the underlying concepts.

Prerequisites

Before you begin, ensure that you’ve:
  • Completed the Borrow USDC against cirBTC collateral quickstart and hold at least one loan in active status.
  • Held sufficient USDC in your Mint balance to cover the repayment amount you plan to submit.

Steps

1

Choose a repayment mode

Decide whether you want to repay in full or partially, then call POST /v1/borrow/loans/{id}/repayments with the corresponding mode.
  • Full repay: set mode: FULL. Circle measures the outstanding debt at the moment it builds the UserOperation and repays that exact amount. On success, Circle releases the loan’s cirBTC collateral back to your Mint balance and the loan transitions to closed.
  • Partial repay: set mode: PARTIAL and include the amount you want to apply in raw uint256 base units. The loan stays active with a reduced debt. No collateral is released.
The endpoint returns an onchainJob with jobType: repay:
Save the job id. You poll it in the next step.
2

Poll the job to completion

Circle builds, signs, and submits the onchain UserOperation for the repayment. The job progresses through submitted and confirmed to completed. Poll GET /v1/borrow/jobs/{id} until you see the terminal state.
3

Confirm the outcome

Fetch the loan to inspect the updated position:
For a full repay, the loan’s status is closed and debtAmount is zero. The cirBTC collateral is credited back to your Mint balance. Confirm the credit by calling GET /v1/businessAccount/balances.For a partial repay, the loan’s status remains active and debtAmount reflects the reduced outstanding balance. No collateral change occurs.