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

# Installment Financial Events

> Understand how installments are stored as Financial Events, the Payment event produced on collection, and the Order fields that roll them up.

## Overview

There is **no dedicated "Installment" object** in fusionCore. An installment is a **Financial Event** — the ledger record fusionCore writes for every money motion — that has been flagged as an installment. Specifically, each installment is a `FCORE_PAY__Financial_Event__c` record with:

* `Type__c = 'Installment'`
* `Status__c = 'Pending'`
* `Is_Installment__c = true`

Each installment Financial Event has one or more `FCORE_PAY__Financial_Event_Line__c` child records — one per product included in that installment's split.

When an installment is collected — manually or by the auto-charge batch — fusionCore produces a separate Financial Event with `Type__c = 'Payment'`, and the original installment event is updated to **Succeeded** (or **Failed** if the charge did not go through).

## Fields on an Installment Financial Event

| Field               | Field API Name                         | Purpose                                                                                                                                     |
| ------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Is Installment      | `FCORE_PAY__Is_Installment__c`         | Indicates the Financial Event is an installment.                                                                                            |
| Number Of Attempts  | `FCORE_PAY__Number_Of_Attempts__c`     | How many times the auto-charge batch has tried to collect this installment. Defaults to `0`.                                                |
| Wallet Item         | `FCORE_PAY__Wallet_Item__c`            | Lookup to the stored payment method (Wallet Item) used to auto-charge this installment. Set when you add a payment method during setup.     |
| Is Cancelled        | `FCORE_PAY__Is_Cancelled__c`           | Indicates the installment is cancelled.                                                                                                     |
| Installment Overdue | `FCORE_PAY__Installment_Overdue__c`    | Checked when the current date is past the Financial Event date.                                                                             |
| Cancellation Date   | `FCORE_PAY__Cancellation_Date__c`      | The date the installment was cancelled.                                                                                                     |
| Portal Checkout URL | `FCORE_PORTAL__Portal_Checkout_URL__c` | The Portal checkout URL for paying this installment. Populated only while the installment is pending. Can surface in the Portal via Roster. |

## Order Roll-Up Fields

fusionCore keeps a running summary of an Order's installment plan on the Order record. These fields are maintained automatically as installments are generated, paid, or fail.

| Field                         | Field API Name                     | Purpose                                                   |
| ----------------------------- | ---------------------------------- | --------------------------------------------------------- |
| Next Installment              | `Next_Installment__c`              | Lookup to the next pending installment Financial Event.   |
| Next Installment Date         | `Next_Installment_Date__c`         | Formula. The date of the next pending installment.        |
| Next Installment Balance Due  | `Next_Installment_Balance_Due__c`  | Formula. The amount due on the next pending installment.  |
| Number Of Failed Installments | `Number_Of_Failed_Installments__c` | The count of installments on this Order that have failed. |

<Note>
  `Next_Installment_Date__c` and `Next_Installment_Balance_Due__c` are formula fields. They recalculate automatically and cannot be edited directly.
</Note>

## Limitations and Common Pitfalls

* **There is no Installment object.** Installments live entirely as `Financial_Event__c` records. If you are building a report or list view, filter Financial Events on `Is_Installment__c = true` (and `Type__c = 'Installment'` for the scheduled, not-yet-paid charges).
* **A Payment event is separate from the installment.** Collecting an installment creates a new `Type__c = 'Payment'` event; it does not convert the installment record in place. The original installment event moves to Succeeded or Failed.
* **The roll-up formula fields are not writable.** `Next_Installment_Date__c` and `Next_Installment_Balance_Due__c` cannot be set by hand — adjust the plan to change them.
* **Number Of Attempts is set by the batch.** `Number_Of_Attempts__c` reflects auto-charge retries and is not a field you edit manually.
