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

# Extra Payment

> Jane wants to pay more than the next installment amount.

## Real-World Example

Jane wants to pay more than the next installment amount. The portal should apply the extra payment to the account balance and adjust remaining scheduled payment amounts or calendar events as needed.

## Visual Flow

```mermaid placement="top-right" actions={true} theme={"system"}
flowchart TD
    A["Consumer submits extra payment"] --> B["Portal validates amount and payment method"]
    B --> C{"Payment succeeds?"}
    C -->|Yes| D["Payment is allocated to schedule"]
    C -->|No| E["Payment failure is shown safely"]
    D --> F["Remaining schedule and calendar update"]
    classDef default fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef actor fill:#E0F2FE,stroke:#0284C7,stroke-width:2px,color:#0C4A6E;
    classDef system fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef decision fill:#FEF3C7,stroke:#D97706,stroke-width:2px,color:#78350F;
    classDef risk fill:#FEE2E2,stroke:#DC2626,stroke-width:2px,color:#7F1D1D;
    classDef outcome fill:#DCFCE7,stroke:#16A34A,stroke-width:2px,color:#14532D;
    class A actor;
    class B,D,F system;
    class C decision;
    class E risk;
    class F outcome;
    linkStyle default stroke:#94A3B8,stroke-width:2px;
```

## How It Should Work

* It should validate extra payment amount and payment method before processing.
* It should allocate successful payment correctly across the schedule.
* It should update remaining payment amount, history, and calendar event amount where needed.

## How It Should Not Work

* It should not overpay a completed account without a clear rule.
* It should not update the schedule before payment success is confirmed.
* It should not leave calendar amounts stale after allocation changes.

## Developer Notes

* Extra payment behavior is schedule allocation, not a new negotiation.
* Calendar amount update jobs help keep external calendars aligned.

## Related App Areas

* `app/Livewire/Consumer/SchedulePlan.php`
* `app/Livewire/Consumer/Forms/ExtraPaymentForm.php`
* `app/Services/Consumer/SchedulePlanPaymentService.php`
* `app/Jobs/UpdateCalendarEventAmount.php`
