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

# Settle Bill

## Settling a Bill (Manual Settlement)

A **Settle Bill** action marks a specific invoice as fully settled in the system. It is an administrative update used when you want a bill to show **zero outstanding balance** without recording a new payment transaction.

Unlike applying a payment, manual settlement does **not** create a payment record and does **not** move cash. It only updates the bill’s settlement status in the database.

### Settle Bill vs. Payment

* **Payment:** Records actual money received from the customer. It creates a `Payment` record and is allocated to bills through FIFO settlement.
* **Settle Bill:** A settlement mark only. It updates the bill’s `settlement` amount so the invoice appears fully settled in AR aging. No payment is created and no ledger/cash transaction is posted.

### Settle Bill vs. FIFO Settlement

* **FIFO Settlement:** Automatic. When payments (or credit notes) are posted, the system allocates them to unpaid bills in date order and updates `Bill.settlement` and `Payment.settlement`.
* **Manual Settle Bill:** User-driven. You choose a specific `Bill`, and the system fully settles **only that bill**, regardless of payment allocation order.

### How the Settled Amount Is Calculated

The system does **not** accept an amount from the user. It calculates the bill’s current obligation using the same formula used for AR aging

After this, outstanding balance becomes:

### Common Use Cases

* **Offline settlement already handled elsewhere:** Payment was collected or adjusted outside the system, but the bill should show as settled in Billspree.
* **Targeted bill closure:** You need to settle one specific invoice without changing payment allocation across other bills.
* **Corrections after review:** A bill should be marked settled for reporting, even when no new payment will be posted in the system.
* **Previous subscription closure:** A customer has been shifted to a new subscription while outstanding bills remain on the old subscription. You can manually settle invoices from the **previous subscription** so those legacy bills no longer appear as due, without affecting the new subscription’s billing cycle.

### System Impact

* **No payment impact:** Does not create or update `Payment` records.
* **No ledger impact:** Does not post accounting/ledger entries.
* **AR aging:** The bill’s outstanding amount becomes zero in aging reports.
* **Audit flag:** Keep record of manual bill settled to identifies bills settled through this action (not via FIFO payment allocation).

### API Usage

**Endpoint:** `POST /manual-settle-bill`

**Required payload:**

```json theme={null}
{
  "billID": 12345,
  "workspace": "your_workspace",
  "appCode": 200,
  "email": "user@example.com"
}
```
