# Loan Payments

[API Documentation](/api/lending/loan-payment-object)

Loan payments move funds from a Column bank account to a loan object, reducing total principal receivable and interest receivable on a loan object. To make a loan payment from an external account, funds must first be transferred to a Column bank account. They can then be applied to a loan with a loan payment.

## Principal and Interest Payments

Our [Loan Payment API](/api/lending/create-a-payment) enables you to specify the principal payment portion and interest payment portion of a loan payment:

- If you set the field `amount` but do not set the field `principal_amount`, we will apply the payment amount to pay off outstanding interest first, and then apply the remaining amount to outstanding principal receivable.
- If you set the field `principal_amount` but do not set the field `amount`, we will apply the whole payment amount to pay down principal receivable.
- If you set both the field `amount` and the field `principal_amount`, we will apply the amount `principal_amount` to the outstanding principal receivable, and the remaining amount to the outstanding interest receivable. If the remaining amount is more than the outstanding interest receivable, we will return 400 errors as interest receivable cannot be overpaid.

| Case           | `amount` | `principal_amount` | Rules                                                                              |
| -------------- | -------- | ------------------ | ---------------------------------------------------------------------------------- |
| Auto           | ✔        | ✖                  | Pay off interest first, and apply remaining to principal                           |
| Principal-only | ✖        | ✔                  | Pay off principal only                                                             |
| Fixed          | ✔        | ✔                  | Apply `principal_amount` to principal, and `amount - principal_amount` to interest |

> **Note**
>
> #### Note
>
> If a loan is partially owned by Column, and partially owned by your platform, we will split the payment amount in a pro-rata manner between Column and your platform.
>
> If you want to apply a payment to principal and interest receivables sold to your platform only, you may set the field `ignore_retained_balances` to `true` when you create a loan payment.

## Online and Offline Payments

Our [Loan Payment API](/api/lending/create-a-payment) also enables you to specify online and offline payments by setting the field `is_offline` when you create loan payments.

- **Online Payments**: For payments collected via Column (e.g. via outgoing ACH debit), you may apply payment from any account by specifying a specific bank account ID when you create a loan payment. Based on overall and retained balances, we will pro-rate payments and move funds from the specified bank account to your collections account (specified by `collection_account_number_id` in the loan program configuration).
- **Offline Payments**: For offline payments collected by your platform away from Column, if a loan is 100% owned by your platform, you do not need to specify a source account. We will only update the principal receivable and interest receivable in our ledger. No funds will be moved to your collections account. However, if a loan is partially or completely owned by Column, you will need to specify a bank account from which to make a loan payment for the portion owned by Column. No funds will be moved to your collections account.

For example, given the following loan of which Column has sold `80%` to your platform:

- Principal receivable: `$200` retained by Column, and `$800` owned by your platform
- Interest receivable: `$10` retained by Column, and `$40` owned by your platform

For a `$200` **online** payment, you will need to prefund a source account with `$200`:

- Interest payments: `$10` to Column and `$40` to your platform
- Principal payment: `$30` to Column and `$120` to your platform
- `$160` will be moved from the source account to the collection account defined on the loan program

For a `$200` **offline** payment, you will need to prefund a source account with `$40`:

- No funds are moved from the source account to your collections account
