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

# Loan object

A Loan represents financing a Business has taken on: a term loan, line of credit, lease, equipment financing, or merchant cash advance. Creating a loan opens a dedicated liability account in the Business's ledger (under `NOTES_PAYABLE` by default), and records the proceeds and repayments against it.

A loan is made up of three related concepts:

* **Proceeds**: the funds (or assets) received when the loan is drawn. A proceed is either a cash **disbursement** or an **asset** that the loan financed (for example, financed equipment). See the [Loan Proceed object](#loan-proceed-object).
* **Payments**: repayments made against the loan, each split into **principal**, **interest**, and **fee** portions. See the [Loan Payment object](#loan-payment-object).
* **Ledger account**: the dedicated liability account Layer maintains for the loan, exposed as `loan_account`.

### Attributes

**id** `string` *required*

Unique identifier for the loan.

**business\_id** `string` *required*

ID of the Business that holds the loan.

**external\_id** `string`

Unique ID of the loan in your system for linking purposes.

**display\_name** `string` *required*

Human-friendly name for the loan.

**loan\_type** `enum` *required*

The type of loan. Values can be: `TERM_LOAN`, `MCA`, `FLEX_LOAN`, `LINE_OF_CREDIT`, `LEASE`, `EQUIPMENT_FINANCING`

**loan\_account** `ChartAccount object` *required*

The dedicated ledger (liability) account for this loan.

**current\_balance** `integer` *required*

Current outstanding balance of the loan, in cents.

**opening\_balance** `Loan Opening Balance object`

The loan's active opening balance, if one has been derived: pre-existing debt recorded against Opening Balance Equity rather than explained by recorded proceeds and payments. Layer derives it from the loan's recorded history and any `reported_balance` you have sent; it is not set directly. Contains `ledger_account_id`, `ledger_account_name`, `balance` (in cents), `effective_at`, `created_at`, `updated_at`, `transaction_tags`, `memo`, `metadata`, and `reference_number`. See [Backfilling existing loans](https://docs.layerfi.com/guides/loans/backfilling-existing-loans.md).

**origination\_date** `ISO8601 date` *required*

Date the loan was originated.

**original\_principal** `integer`

Original principal, in cents. Present for `TERM_LOAN`, `MCA`, `FLEX_LOAN`, `LEASE`, and `EQUIPMENT_FINANCING`.

**credit\_limit** `integer`

Credit limit, in cents. Present for `LINE_OF_CREDIT`.

**fee\_percentage** `string`

Fixed fee, expressed as a percentage in a decimal string (for example, `"15"` for a 15% fee). Present for `MCA` and `FLEX_LOAN`.

**loan\_term\_months** `integer`

Loan term in months. Present for `TERM_LOAN`, `LEASE`, and `EQUIPMENT_FINANCING`.

**completed\_at** `ISO8601 timestamp`

When the loan was fully repaid, if applicable.

**cancelled\_at** `ISO8601 timestamp`

When the loan was cancelled, if applicable.

**archived\_at** `ISO8601 timestamp`

When the loan was archived, if applicable.

**memo** `string`

Internal note about the loan.

**metadata** `object`

Arbitrary JSON object you can attach for your own use. Layer stores and returns it unchanged.

**reference\_number** `string`

Reference number for the loan.

**transaction\_tags** `array of Tag objects`

Tags applied to this loan.

## Loan Proceed object

A Loan Proceed represents funds (or an asset) received when a loan is drawn. A proceed is one of two types:

* **`DISBURSEMENT`**: a cash disbursement, received via a `method` such as ACH or check.
* **`ASSET`**: an asset the loan financed (for example, financed equipment). The funded asset is referenced by `asset_id`.

Proceeds can be supplied inline when you [create](https://docs.layerfi.com/api-reference/v1/loans/create-loan.md) or [update](https://docs.layerfi.com/api-reference/v1/loans/update-loan.md) a loan, or managed individually with the loan proceed endpoints: [list](https://docs.layerfi.com/api-reference/v1/loans/list-loan-proceeds.md), [create](https://docs.layerfi.com/api-reference/v1/loans/create-loan-proceed.md), [fetch](https://docs.layerfi.com/api-reference/v1/loans/fetch-loan-proceed.md), [update](https://docs.layerfi.com/api-reference/v1/loans/update-loan-proceed.md), and [archive](https://docs.layerfi.com/api-reference/v1/loans/archive-loan-proceed.md).

### Attributes

**id** `string` *required*

Unique identifier for the loan proceed.

**business\_id** `string` *required*

ID of the Business that holds the loan.

**external\_id** `string`

Unique ID of the proceed in your system for linking purposes.

**loan\_id** `string` *required*

ID of the loan this proceed belongs to.

**loan\_proceed\_type** `enum` *required*

How the proceeds were received. Values can be: `ASSET`, `DISBURSEMENT`

**method** `enum` *required*

Payment method used for the proceed. Values can be: `CASH`, `CHECK`, `CREDIT_CARD`, `ACH`, `CREDIT_BALANCE`, `OTHER`

**amount** `integer` *required*

Proceed amount, in cents.

**asset\_id** `string`

ID of the asset funded by this proceed. Present for `ASSET` proceeds.

**date** `ISO8601 date` *required*

Date the proceed was received.

**archived\_at** `ISO8601 timestamp`

When the proceed was archived, if applicable.

**memo** `string`

Internal note about the proceed.

**metadata** `object`

Arbitrary JSON object you can attach for your own use.

**reference\_number** `string`

Reference number for the proceed.

**transaction\_tags** `array of Tag objects`

Tags applied to this proceed.

## Loan Payment object

A Loan Payment is a repayment made against a loan. Each payment is broken into one or more **splits** by type (`PRINCIPAL`, `INTEREST`, `FEE`), and the splits must sum to the payment `amount` and share its sign. A payment with a negative `amount` is a **reversal**, which gives back an earlier repayment. Record a reversal as its own payment rather than editing the payment it offsets, so the reversal books on its own date. Payments can optionally be **deferred**: recorded but not posted to the ledger until they are paid out or their due date is reached.

### Attributes

**id** `string` *required*

Unique identifier for the loan payment.

**business\_id** `string` *required*

ID of the Business that made the payment.

**external\_id** `string`

Unique ID of the payment in your system for linking purposes.

**loan\_id** `string` *required*

ID of the loan this payment applies to.

**splits** `array of LoanPaymentSplit objects` *required*

The principal, interest, and fee splits that make up this payment. The split amounts sum to `amount` and share its sign.

**LoanPaymentSplit properties**

**id** `string` *required*

Unique identifier for the split.

**external\_id** `string`

Unique ID of the split in your system for linking purposes.

**split\_type** `enum` *required*

The portion of the payment this split applies to. Values can be: `PRINCIPAL`, `INTEREST`, `FEE`

**amount** `integer` *required*

Split amount, in cents.

**account** `Account Identifier` *required*

The ledger account this split posted to.

**amount** `integer` *required*

Total payment amount, in cents. Negative on a reversal.

**date** `ISO8601 date` *required*

Date of the payment.

**defer\_posting** `boolean` *required*

Whether posting to the ledger is deferred.

**method** `enum` *required*

Payment method. Values can be: `CASH`, `CHECK`, `CREDIT_CARD`, `ACH`, `CREDIT_BALANCE`, `OTHER`

**processor** `string`

Payment processor, if any.

**payment\_clearing\_account** `ChartAccount object`

The clearing account used for the payment, if any.

**archived\_at** `ISO8601 timestamp`

When the payment was archived, if applicable.

**memo** `string`

Internal note about the payment.

**metadata** `object`

Arbitrary JSON object you can attach for your own use.

**reference\_number** `string`

Reference number for the payment.

**transaction\_tags** `array of Tag objects`

Tags applied to this payment.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.