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

# Repayment

> How and when a loan is paid back: the payments, the frequency, the payment day, the first payment and early repayment.

Repayment sets **how many payments a loan has**, **how often they fall due**, and **what extra money does**. It is the third step of [New product](https://docs.capcells.com/products/create.md).

![The Repayment step of New product: payments 12, 18 and 24, frequency Monthly, payment day Issue day, first payment after 10 days, early repayment Smaller payments](https://mintcdn.com/capcells/pik8-STZbuHD3D3L/images/workspace/new-product-repayment.png?fit=max\&auto=format\&n=pik8-STZbuHD3D3L\&q=85\&s=9ef55e4f815bba431be8b70ecdb7ca1c)

| Term | What it sets | Product types |
| - | - | - |
| [Payments](#payments) | The payment counts a client can choose | Instalment, Buy Now Pay Later |
| [Frequency](#frequency) | How often a payment falls due | All |
| [Payment day](#payment-day) | The day of the month a payment falls on | All |
| [First payment after](#first-payment-after) | The least wait before the first payment | All |
| [Early repayment](#early-repayment) | What extra money does | All |

## Payments

The **menu of payment counts** you offer. The client picks one for each loan.

* **Enter** a number and press Enter. Repeat for each choice.
* **Example:** 12, 18 and 24.
* **On a loan:** a count that is not on the menu is not offered.
* **API:** `terms`.

Payments counts **payments, not months**. With Monthly, 12 payments is a year. With Biweekly, 12 payments is 24 weeks. A Pay Day Loan is always one payment and has no such field.

## Frequency

**How often a payment falls due.** Monthly is selected to begin with.

| Option | A payment falls due | A year | In Mexico |
| - | - | - | - |
| **Monthly** | Once a month | 12 | *mensual* |
| **Semi‑monthly** | On the 15th and the last day | 24 | *quincenal* |
| **Biweekly** | Every 14 days from the loan's start | 26 | *catorcenal* |
| **Weekly** | Every 7 days from the loan's start | 52 | *semanal* |

> [!WARNING]
>
> **Semi-monthly and biweekly are not the same.** Semi-monthly follows the calendar: the same two dates every month. Biweekly follows the loan: every 14 days, on dates that drift through the month.

Match the frequency to how your clients are paid. A payroll loan for people paid on the 15th and the last day is Semi-monthly.

> [accordion] The first three payments of a loan issued on 2 March
>
> | Frequency | 1st | 2nd | 3rd |
> | - | - | - | - |
> | Monthly, on the issue day | 2 April | 2 May | 2 June |
> | Semi-monthly | 15 March | 31 March | 15 April |
> | Biweekly | 16 March | 30 March | 13 April |
> | Weekly | 9 March | 16 March | 23 March |

### Frequency in the API

The Engine holds the frequency and the payment day together, as one `schedule`.

| In the Workspace | `schedule` |
| - | - |
| Monthly, on the issue day | `anchored_monthly` |
| Semi‑monthly | `semi_monthly_grid` on the 15th and the last day |
| Biweekly | `anchored_every_n_days`, 14 days |
| Weekly | `anchored_every_n_days`, 7 days |

The API takes more schedules than the window offers. See [Products in the Engine](https://docs.capcells.com/lending/products.md#schedules-the-workspace-does-not-offer).

## Payment day

**Which day of the month** a payment falls on. You choose it only for a Monthly product.

| Frequency | Payment day |
| - | - |
| **Monthly** | You choose: Issue day, a day from the 1st to the 28th, or Last day |
| **Semi‑monthly** | Locked: 15th and last day |
| **Biweekly, Weekly** | None. Payments count days from the loan's start |

![The Repayment step with Frequency set to Semi-monthly: Payment day is locked and reads 15th and last day](https://mintcdn.com/capcells/pik8-STZbuHD3D3L/images/workspace/new-product-repayment-semi-monthly.png?fit=max\&auto=format\&n=pik8-STZbuHD3D3L\&q=85\&s=9bb7a18689b490aba33285b1c12a0b50)

A date that lands on a weekend or a bank holiday is collected on the **next banking day**. The date moves and the amount does not.

> [!NOTE]
>
> **With the Credit Engine:** a Monthly product with one set day of the month is kept there on the issue day, and the product says so under Payment day.

## First payment after

The **least number of days** between issuing a loan and its first payment.

* **Enter** a number of days, from 0 to 365.
* **Example:** 10.
* **On a loan:** if the next payment date comes sooner than this, the loan skips it and starts on the one after.
* **API:** `first_period_gap_days`. Left out means zero.

A product pays on the 20th. A loan is issued on 9 March.

| First payment after | First payment |
| - | - |
| 0 days | 20 March |
| 15 days | 20 April, because 20 March is too soon |

## Early repayment

**What happens when a client pays more than is due.** Smaller payments is selected to begin with.

| Option | What extra money does | API |
| - | - | - |
| **Smaller payments** | Reduces what is owed. Later payments shrink, their number stays | `reduces_principal` |
| **Pay ahead** | Pays the next payments early, at their scheduled amounts. The plan does not change | `advances_instalments` |

The field in the API is `early_money_treatment`. What a client may choose on a single payment is on [Payments](https://docs.capcells.com/lending/payments.md#what-the-borrower-may-choose).

## More in the API

The product's **Restructuring fee** is set with Edit on the product, not in the window. The API also holds a minimum payment and the rollover terms of a Pay Day Loan. [Terms reference](https://docs.capcells.com/products/terms-reference.md#repayment) lists them all.


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