Skip to main content
This quickstart walks you through a complete Line of Credit draw and repayment lifecycle using the Credit API. You check your available credit, request a draw, track the transfer through disbursement, and repay using USDC from your Circle Mint wallet.

Prerequisites

Before you begin, ensure you have:
  • An approved Line of Credit facility with Circle. Contact your Circle representative if you haven’t completed the offline credit agreement.
  • A Circle Mint API key with the Credit API entitlement enabled.
  • Familiarity with Circle Mint authentication and idempotent requests.

Step 1: Check your credit line status

Before requesting a draw, verify that your credit line is active and has sufficient available credit. Call the GET /v1/credit endpoint to retrieve your credit line details.
curl --location --request GET 'https://api-sandbox.circle.com/v1/credit' \
--header 'Authorization: Bearer YOUR_API_KEY'
Response
{
  "data": {
    "id": "b3d9d2d5-4c12-4946-a09d-953e82fae2b0",
    "product": "lineOfCredit",
    "status": "active",
    "limit": { "amount": "1000000.00", "currency": "USD" },
    "used": { "amount": "250000.00", "currency": "USD" },
    "available": { "amount": "750000.00", "currency": "USD" },
    "outstandingTransfers": 2,
    "feeRates": { "dailyFee": "0.0003" },
    "unpaidFees": { "amount": "150.00", "currency": "USD" },
    "minBalance": { "amount": "100000.00", "currency": "USD" },
    "validationErrors": [],
    "createDate": "2024-01-15T10:30:00.000Z",
    "updateDate": "2024-03-20T14:22:00.000Z"
  }
}
Confirm the following before proceeding:
  • product is lineOfCredit.
  • status is active.
  • available.amount is greater than or equal to the amount you plan to draw.
  • validationErrors is an empty array. If it contains errors such as INSUFFICIENT_BALANCE, PENDING_FEES, or OVERDUE_TRANSFERS, resolve them before you create a new transfer.

Step 2: Request a draw

Request a draw against your credit line by calling POST /v1/credit/transfers with an idempotency key and the desired amount. Unlike Settlement Advance transfers, LoC draws are auto-approved and don’t require wire proof or Treasury review.
curl --location --request POST 'https://api-sandbox.circle.com/v1/credit/transfers' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "idempotencyKey": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7",
  "amount": { "amount": "50000.00", "currency": "USD" }
}'
Response
{
  "data": {
    "id": "a1c2e3f4-5678-4d90-b123-456789abcdef",
    "amount": { "amount": "50000.00", "currency": "USD" },
    "status": "requested",
    "createDate": "2024-03-20T14:20:00.000Z",
    "updateDate": "2024-03-20T14:20:00.000Z"
  }
}
Save the transfer id from the response. You need it to track the transfer in the next step. The transfer starts in requested status and automatically transitions to disbursed once the funds are deposited into your Circle Mint wallet. No manual approval step is required.

Step 3: Track the transfer

Monitor your transfer as it progresses from requested to disbursed. You can poll the transfer endpoint or subscribe to webhook notifications.

Poll the transfer endpoint

Call GET /v1/credit/transfers/{id} to check the current transfer status.
curl --location --request GET 'https://api-sandbox.circle.com/v1/credit/transfers/a1c2e3f4-5678-4d90-b123-456789abcdef' \
--header 'Authorization: Bearer YOUR_API_KEY'
Once the transfer is disbursed, the response includes fee and repayment details:
Response
{
  "data": {
    "id": "a1c2e3f4-5678-4d90-b123-456789abcdef",
    "amount": { "amount": "50000.00", "currency": "USD" },
    "status": "disbursed",
    "outstanding": { "amount": "50150.00", "currency": "USD" },
    "fees": {
      "total": { "amount": "150.00", "currency": "USD" },
      "unpaid": { "amount": "150.00", "currency": "USD" }
    },
    "dueDate": "2024-04-20T00:00:00.000Z",
    "disbursedDate": "2024-03-20T14:22:00.000Z",
    "createDate": "2024-03-20T14:20:00.000Z",
    "updateDate": "2024-03-21T00:00:00.000Z"
  }
}
The outstanding amount includes the original draw plus any accrued fees. The dueDate indicates when repayment is expected.

Subscribe to webhook notifications

For real-time updates, subscribe to webhook notifications through the Circle Mint webhook management UI:
  • creditTransfers: Receive notifications whenever a transfer changes status, such as the transition from requested to disbursed.
  • creditFees: Receive notifications when fees are accrued against your outstanding transfers.
  • creditRepayments: Receive notifications when a repayment is received and allocated against your outstanding balance.
The Line of Credit transfer follows this status lifecycle: requested -> disbursed -> paid A transfer can also reach rejected (if the request is declined) or past_due (if repayment is overdue after the due date).

Step 4: Repay outstanding balances

You can repay Line of Credit draws in two ways:
  • Crypto repayment: Deduct USDC directly from your Circle Mint wallet balance using the POST /v1/credit/cryptoRepayment endpoint.
  • Wire repayment: Send a wire transfer to Circle using the instructions from GET /v1/credit/wireInstructions. Include the trackingRef value on your wire so Circle can match the payment to your credit line. For details on retrieving wire instructions, see the Settlement Advance quickstart.
The following example shows a crypto repayment. Call POST /v1/credit/cryptoRepayment with the amount you want to apply toward your outstanding balance.
curl --location --request POST 'https://api-sandbox.circle.com/v1/credit/cryptoRepayment' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "idempotencyKey": "d7a3e2c1-8f45-4b91-ae67-2c9d0f8b3e5a",
  "amount": { "amount": "25000.00", "currency": "USD" }
}'
Response
{
  "data": {
    "id": "e5f6a7b8-9012-3456-efab-345678901234",
    "amount": { "amount": "25000.00", "currency": "USD" },
    "status": "pending",
    "createDate": "2024-03-25T10:00:00.000Z",
    "updateDate": "2024-03-25T10:00:00.000Z"
  }
}
The requested repayment amount is capped at your total outstanding balance. If you specify an amount greater than what you owe, the API applies only the outstanding balance. Crypto repayment is available exclusively for Line of Credit products.

Step 5: Verify repayment status

After initiating a repayment, verify that it completes successfully. You can poll the repayments endpoint or subscribe to webhook notifications.

Poll the repayments endpoint

Call GET /v1/credit/repayments to list all repayments and check their status.
curl --location --request GET 'https://api-sandbox.circle.com/v1/credit/repayments' \
--header 'Authorization: Bearer YOUR_API_KEY'
Once the repayment is processed, the response shows the completed payment with the amount applied:
Response
{
  "data": [
    {
      "id": "d4e5f6a7-b890-1234-defa-234567890123",
      "transferId": "a1c2e3f4-5678-4d90-b123-456789abcdef",
      "amountApplied": { "amount": "25000.00", "currency": "USD" },
      "paymentAmount": { "amount": "25000.00", "currency": "USD" },
      "type": "crypto",
      "status": "completed",
      "settlementDate": "2024-04-08T12:00:00.000Z",
      "createDate": "2024-04-08T12:00:00.000Z",
      "updateDate": "2024-04-08T12:00:00.000Z"
    }
  ]
}
The transferId field links the repayment to the original draw. The amountApplied reflects the portion of the payment allocated to that transfer’s outstanding balance.

Subscribe to webhook notifications

For real-time repayment tracking, subscribe to creditRepayments webhook notifications through the Circle Mint webhook management UI. You receive notifications when a repayment is received and allocated against your outstanding transfers.