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

# Create Loan

> Creates a new loan using specified collateral against a matched loan configuration.

<ParamField body="user_id" type="string" required>
  The id of the user who will receive the loan.
</ParamField>

<ParamField body="duration" type="number" required>
  Loan duration in months.
</ParamField>

<ParamField body="currency" type="string" required>
  Loan currency (e.g., "NGN").
</ParamField>

<ParamField body="interest_rate" type="number" required>
  Interest rate, expressed as a decimal between 0 and 1 (e.g., 0.05 for 5%).
</ParamField>

<ParamField body="amount" type="string" required>
  The amount loaned out to a customer
</ParamField>

<ParamField body="repayment_amount" type="string" required>
  The amount to be paid back by the customer
</ParamField>

<ParamField body="collaterals" type="object[]" required>
  Array of collateral objects with token\_id and quantity.

  ```
  [
      { "token_id": "67e2f7ed702e11a6778681a3", "quantity": 2 }, 
      { "token_id": "67e2f7ed702e11a6778681b3", "quantity": 5 }
  ]
  ```
</ParamField>

<ParamField body="loan_configuration_id" type="string" required>
  ID of the matched loan configuration.
</ParamField>

<ParamField body="reason" type="string">
  Optional reason for the loan.
</ParamField>

<ParamField body="bank_name" type="string">
  Optional name of the bank to repay a loan to
</ParamField>

<ParamField body="bank_code" type="string">
  Optional bank code
</ParamField>

<ParamField body="account_number" type="string">
  Optional Account number
</ParamField>

<ResponseExample>
  ```json theme={null}
  {
      "status": "success",
      "message": "Loan created successfully",
      "data": {
          "id": "67ef8652ad2aff781bf017c6",
          "borrower": "67d3267b6b2f7dfc493db74a",
          "creditor": "624598bd83067c00f691c0ca",
          "amount": 840000,
          "currency": "NGN",
          "repayment_amount": 1596000,
          "repayment_date": "Fri Jul 04 2025 08:12:11 GMT+0100 (West Africa Standard Time)",
          "interest_rate": 0.3,
          "duration": 3,
          "status": "ACTIVE",
          "grace_period": 5,
          "grace_period_unit": "DAYS",
          "reason": "Personal Use",
          "created_at": "2025-04-04T07:12:18.561Z",
          "updated_at": "2025-04-04T07:12:18.561Z",
          "collaterals": [
              {
                  "name": "CredPal2",
                  "token_id": "67e30ac4c6ee9dd9cc0fe0e4",
                  "quantity": 10
              },
              {
                  "name": "CredPal",
                  "token_id": "66b3dd8b7f741f367b960f26",
                  "quantity": 100
              }
          ]
      }
  }
  ```
</ResponseExample>
