> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sprinter.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Repay Debt

> Creates list of contract calls to approve USDC and repay debt to CreditHub

<Info>
  The `asset` parameter is the credit asset symbol — currently supported values are `usdc` and `eure`. Repay before the due date to avoid the **15% overdue APR**. See [Fees](/sprinter-credit/credit-engine#fees) for details.
</Info>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/repay?amount=1000000'
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/repay",
      params={"amount": "1000000"}
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/repay?amount=1000000"
  );
  const data = await response.json();
  console.log(data);
  ```

  ```go Go theme={null}
  package main

  import (
  	"fmt"
  	"io"
  	"net/http"
  )

  func main() {
  	resp, _ := http.Get("https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/repay?amount=1000000")
  	defer resp.Body.Close()
  	body, _ := io.ReadAll(resp.Body)
  	fmt.Println(string(body))
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "calls": [
      {
        "chain": "8453",
        "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "data": "0x095ea7b3000000000000000000000000abcdef1234567890abcdef1234567890abcdef12",
        "value": "0"
      },
      {
        "chain": "8453",
        "to": "0x1234567890abcdef1234567890abcdef12345678",
        "data": "0x2e1a7d4d000000000000000000000000000000000000000000000000000000000005f5e100",
        "value": "0"
      }
    ]
  }
  ```
</ResponseExample>

<Tip>
  **Machine-readable API spec:** [OpenAPI JSON](https://api.sprinter.tech/swagger/doc.json) | [Swagger UI](https://api.sprinter.tech/swagger/index.html)
</Tip>


## OpenAPI

````yaml get /credit/v2/accounts/{account}/assets/{asset}/repay
openapi: 3.0.0
info:
  contact: {}
  title: ''
  version: 0.0.1
servers:
  - url: https://api.sprinter.tech
    description: Production server
security: []
paths:
  /credit/v2/accounts/{account}/assets/{asset}/repay:
    get:
      tags:
        - Credit
      summary: Call data to repay credit debt
      description: >-
        Creates list of contract calls to approve USDC and repay debt to
        CreditHub
      parameters:
        - description: Account (borrower) that will repay the debt
          name: account
          in: path
          required: true
          schema:
            type: string
        - example: usdc
          description: Credit asset symbol (e.g. usdc, eure)
          name: asset
          in: path
          required: true
          schema:
            type: string
        - description: Amount in lowest denomination (e.g., wei for ETH)
          name: amount
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of contract calls to execute repayment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/credit.Repay.response'
        '400':
          description: Bad request due to invalid input or missing parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
components:
  schemas:
    credit.Repay.response:
      type: object
      required:
        - calls
      properties:
        calls:
          type: array
          items:
            $ref: '#/components/schemas/evm.ContractCall'
    responses.ErrorResponse:
      type: object
      required:
        - error
      properties:
        debug:
          type: string
        error:
          type: string
    evm.ContractCall:
      type: object
      required:
        - chain
        - data
        - to
        - value
      properties:
        chain:
          type: string
        data:
          type: array
          items:
            type: integer
        to:
          type: array
          items:
            type: integer
        value:
          $ref: '#/components/schemas/types.BigInt'
    types.BigInt:
      type: object

````