Skip to Content
App MonetizationBilling Cycles

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:

  1. Infrastructure bills — Charges for IronFlock infrastructure usage (storage, network, virtual devices, AI)
  2. 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:

TaskDescription
Cycle billsGenerates 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 checksDetects 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 emailsSends 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.

ResourceHow It’s Measured
StorageGB stored in project backends
NetworkMB transferred (in + out)
Virtual devicesActive days × daily rate (rate determined by VM tier)
AI tokensAI 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_price

If 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

  1. Count app-days — For each app on each device, count the number of days it ran in PROD mode during the billing period.

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

  3. 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
  4. 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):

StepCalculation
Total app-days20 × 30 = 600
Included ongoing units14
Billable units600 − 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:

StageDescription
DraftUsage is being accumulated. Updated hourly. Not yet charged.
FinalizedBilling period ended. Total amount is locked.
InvoicedStripe invoice created. Infrastructure and app charges grouped into a single invoice.
PaidCustomer’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.

Last updated on