Billing Cycles
How IronFlock calculates and generates monthly bills for infrastructure resources and third-party app usage.
Overview
IronFlock runs a monthly billing cycle that produces two separate types of bills for each customer:
- Infrastructure bills — Charges for IronFlock infrastructure usage (storage, network, virtual devices, AI)
- App bills — Charges for third-party app usage (app-days), where the revenue flows to the app distributor
Both billing streams are processed independently and appear as separate line items on the customer’s invoice.
Billing Cadence
The billing system runs three background tasks every 60 minutes:
| Task | Description |
|---|---|
| Cycle bills | Generates or updates billing records for all accounts. At the end of each monthly period, finalized bills are grouped into a Stripe invoice and charged automatically. |
| Payment detail checks | Detects accounts that have exceeded their free usage tier but have no payment method on file. Devices on these accounts are restricted until a valid payment method is added. |
| Budget alert emails | Sends alerts when usage approaches or exceeds the customer’s configured budget. A soft limit warning is sent at the budget percentage threshold. A hard limit alert is sent when the full budget is exceeded. |
Infrastructure Billing
Infrastructure bills cover IronFlock’s own resources used by the customer. These charges go directly to IronFlock.
| Resource | How It’s Measured |
|---|---|
| Storage | GB stored in project backends |
| Network | MB transferred (in + out) |
| Virtual devices | Active days × daily rate (rate determined by VM tier) |
| AI tokens | AI Credits |
Each customer’s active product defines included resources. The billing system compares actual usage against these allowances:
overage = actual_usage - included_amount
billable_amount = overage × unit_priceIf usage stays within the included allowance, no additional charge is applied for that resource.
App Billing
App bills cover the usage of third-party apps published by distributors. The revenue from these bills is shared between the distributor and IronFlock.
How App-Days Are Billed
-
Count app-days — For each app on each device, count the number of days it ran in PROD mode during the billing period.
-
Subtract included units — Deduct the product’s included ongoing units and any remaining one-time units from the total. One-time included units are a lifetime allocation that decreases across billing periods.
-
Apply volume discounts — Total app-days are summed across all devices using the app for that customer. The rebate parameter calculates the effective per-unit price:
effective_price = base_price × units^(-rebate) total_cost = effective_price × units -
Generate bill — A separate billing record is created per distributor. If a customer uses apps from multiple distributors, each gets an independent billing record.
Example
A customer uses 20 devices with your app for a full month (30 days):
| Step | Calculation |
|---|---|
| Total app-days | 20 × 30 = 600 |
| Included ongoing units | 14 |
| Billable units | 600 − 14 = 586 |
| Base price / rebate | €5.00 / 0.3 |
| Effective price | €5.00 × 586^(−0.3) ≈ €0.63 per unit |
| Total bill | €0.63 × 586 ≈ €369.18 |
Bill Lifecycle
Each bill progresses through defined stages:
| Stage | Description |
|---|---|
| Draft | Usage is being accumulated. Updated hourly. Not yet charged. |
| Finalized | Billing period ended. Total amount is locked. |
| Invoiced | Stripe invoice created. Infrastructure and app charges grouped into a single invoice. |
| Paid | Customer’s payment method charged. App distributor’s revenue share becomes available for payout. |
Viewing Billing History
Customers can view billing history in User Settings → Billing, including:
- Breakdown of charges per billing period
- Separate line items for infrastructure usage and each third-party app
- Invoice status (pending, paid, failed)
- Links to download invoice PDFs from Stripe
As an app distributor, you can see revenue generated by your apps in the Seller section of User Settings.