> ## 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.

# Platform Billing and Reports

> At month end, the platform sends DFA donation reporting and partner billing reports.

## Real-World Example

At month end, the platform sends DFA donation reporting and partner billing reports. Separately, over-limit billing jobs charge creditors when usage exceeds plan limits.

## Visual Flow

```mermaid placement="top-right" actions={true} theme={"system"}
flowchart TD
    A["Scheduled platform billing or report time arrives"] --> B["Command selects eligible records"]
    B --> C{"Billing or report job?"}
    C -->|Billing| D["Payment job charges or retries account"]
    C -->|Report| E["Report email job is queued"]
    D --> F["Platform record is updated"]
    E --> F
    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,B,D,E,F system;
    class C decision;
    class F outcome;
    linkStyle default stroke:#94A3B8,stroke-width:2px;
```

## How It Should Work

* It should run over-limit billing, failed over-limit retries, donation reports, and partner reports on schedule.
* It should keep billing attempts and report delivery traceable.
* It should avoid overlapping scheduled billing work.

## How It Should Not Work

* It should not bill the wrong creditor or subscription.
* It should not send partner or donation reports with incomplete reporting windows.
* It should not ignore failed platform billing records.

## Developer Notes

* These jobs are mostly invisible to normal portal users but are important to platform operations.
* Some commands use America/New\_York timezone for monthly report schedules.

## Related App Areas

* `app/Console/Commands/OverLimitBillingCommand.php`
* `app/Console/Commands/ReprocessOverLimitFailedCommand.php`
* `app/Jobs/OverLimitPaymentJob.php`
* `app/Console/Commands/MonthlyDfaDonationReportCommand.php`
* `app/Jobs/SendMonthlyDfaDonationReportJob.php`
* `app/Console/Commands/PartnerMonthlyBillingReportsCommand.php`
* `app/Jobs/SendPartnerMonthlyBillingReportJob.php`
