Skip to main content

Billing Overview

CMP billing has three layers that work together:

Rate Card (what it costs) → Billing Cycle (how often) → Payment Mode (how customer pays)
↑ ↑
Billing Rules (policies that adjust or enforce charges)
LayerQuestion it answersDocumentation
Billing Settings (admin)See generate_prepaid_reciept, enabled payment modes, billing rulesBilling Settings
One Account One InvoiceConsolidated monthly invoice for postpaid/manual (enable_one_account_one_invoice)OAOI
Customer Billing DashboardEnd-customer Billing UI, Account Statement, Usage DetailsCustomer Billing Dashboard
Rate cardsWhat packages exist and what do they cost?Rate Cards
Billing cyclesHourly through tri-annually?Billing Cycles
Payment modesPrepaid, postpaid, or manual payment?Payment Modes
Billing rulesHow charges are calculated (pro-rata, etc.)?Billing Rules
Invoice SettingsBranches, invoice branding, tax, invoice numbers, termsInvoice Settings
Payment gatewaysWhich provider collects payments?Payment Gateways
Stoppable servicesDo compute charges pause when a VM/K8s is stopped?Stoppable Services
Low infra credit notificationsPrepaid wallet below threshold alerts?Low Infra Credit Notifications
Free trialsOffer VMs / volumes / licenses at no cost for a limited period?Free Trials
Auto PayPrepaid auto top-up from saved payment method?Auto Pay
Disciplinary actionsFreeze, suspend, terminate for overdue / negative balanceDisciplinary Actions
Quick start — new provider setup
  1. Create rate cards and configure all package prices with billing cycles
  2. Set global rules — bandwidth threshold, backup billing, and other settings in Billing Rules (note: plan_ip_billing is deprecated; charge IPs separately — see IP Address packages)
  3. Configure Payment Mode Settings with StackConsole — decide which modes are available per account type before go-live — see Payment Mode Settings
  4. Configure payment gateways and currency top-up amounts in Settings → Billing Setup
  5. Onboard test customer → provision VM hourly and monthly → verify wallet or invoice behaviour
  6. Review Billing FAQs for common customer questions

The Four Core Billing Dimensions​

To quickly understand how CMP calculates and collects charges without getting lost in technical settings, think of billing as four independent dimensions working together:

DimensionCore questionWhat it controlsExamples
1. Billing Cycle"For what duration?"The length of the billable periodHourly (PAYG), Monthly, Quarterly, Yearly, Multi-Year
2. Billing Mode"When do we charge?"Charging in advance vs. in arrearsPrepaid (before service) vs. Postpaid (after service)
3. Collection Trigger"How is payment collected?"Mechanism that executes the chargeWallet deduction, automated card charge, Manual, Threshold
4. Billing Rule"How is amount calculated?"Calendar alignment and partial-period mathPRO_RATA, DATE_TO_DATE, CALENDAR_MONTH
Key Concept: Dimensions are Independent

A billing cycle is NOT locked to a single payment mode. While Yearly cycles are commonly paired with Prepaid (to collect the full period upfront), CMP supports both Prepaid and Postpaid across billing cycles.

  • Billing Mode controls when the customer is charged (timing).
  • Billing Rule controls how the date boundaries and prorations are calculated.
  • Changing the payment mode does not alter the base catalogue price from the Rate Card.

1. Billing Cycle (The Service Period)​

Defines the duration for which pricing is quoted and calculated:

  • Hourly (Pay as you go): Charged strictly for the actual hours a service runs.
  • Monthly: Standard fixed recurring monthly commitment.
  • Quarterly / Yearly / Multi-Year: Extended commitments (3, 6, 12, 24, or 36 months).

2. Billing Mode (Advance vs. Arrears)​

Defines when the customer's financial obligation is realized:

  • Prepaid: Charged at the beginning of the period. For Monthly, the month is paid upfront. For Yearly, the full annual charge is collected before usage begins.
  • Postpaid: Invoiced after the consumption period has completed (or at scheduled billing intervals).

3. Collection Method / Trigger (How Payment Occurs)​

Determines how the payable amount is collected or what event triggers invoicing:

  • Prepaid Wallet (Infra Credits): Balance deducted in real time (for hourly) or at cycle renewal.
  • Postpaid Card Auto-Charge: Automated charge against a saved credit card (e.g., Stripe) at invoice generation.
  • Manual Payment: Offline settlement (bank wire, check, PO). Admin verifies receipt and manually marks invoices as paid.
  • Threshold Invoicing: Triggers an interim invoice automatically as soon as accrued unbilled usage hits a defined spending cap (e.g., $500), rather than waiting for period-end.

4. Billing Rule (Calculation & Alignment)​

Determines how the billing engine calculates charges when a service starts mid-period or follows specific date boundaries:

  • PRO_RATA: Calculates exact daily usage for the partial start month, aligning all subsequent renewals to calendar boundaries (1st of the month).
  • DATE_TO_DATE: Follows the customer's exact creation date anniversary (e.g., 15 Jan → 14 Feb). Required for Service Contracts.
  • CALENDAR_MONTH: Strictly aligns billing windows to full calendar months.

How the Dimensions Work Together (Examples)​

Because these four dimensions are decoupled, providers can configure flexible combinations to meet diverse customer needs:

Billing CycleBilling ModeBilling RuleReal-World Workflow
MonthlyPrepaidPRO_RATACustomer pays remaining days of first month upfront, then full monthly price on the 1st.
MonthlyPostpaidPRO_RATACustomer uses VM throughout the month; billed on the 1st of the following month for actual usage.
MonthlyPostpaidDATE_TO_DATECustomer is invoiced on each monthly anniversary of their creation date (e.g., 18th to 17th).
YearlyPrepaidDATE_TO_DATEUpfront annual plan: full 12-month rate card price deducted from wallet/card at deployment.
YearlyPostpaidDATE_TO_DATEPostpaid annual plan: customer invoiced after the 12-month period (or tracked via threshold caps).
YearlyPostpaid / PrepaidDATE_TO_DATE (Contract)Service Contract: 12-month commitment lock-in, but billed in predictable monthly installments (Yearly ÷ 12 minus discount) rather than charging the entire year upfront.
Long Commitments Without Cash Flow Delays: Service Contracts

Under standard billing, a Yearly cycle on Postpaid would mean waiting up to 12 months for payment. Enabling Service Contracts solves this: it secures a binding 12-month legal commitment with deletion blocks and renewal deadlines, while billing the customer in manageable monthly installments.

Billing Cycle + Billing Mode + Collection/Trigger + Billing Rule → Billing Outcome

Key Takeaway: The Rate Card sets the base service price, while the four independent dimensions determine how, when, and over what period that price is calculated, triggered, and collected.


Payment modes (summary)​

ModePayment model
PrepaidCustomer tops up wallet; usage deducted in real time. Low infra credit notifications alert when balance falls below a threshold.
PostpaidUsage tracked; invoiced at cycle end; card can auto-charge
ManualCustomer pays offline; admin verifies and marks invoices paid

See Payment Modes.

Billing cycles (summary)​

CycleDurationInvoice timing
HourlyPer hourEnd of month (consolidated)
Monthly1 monthOn service creation
Quarterly3 monthsOn service creation
Semi-annually6 monthsOn service creation
Annually12 monthsOn service creation
Bi-annually24 monthsOn service creation
Tri-annually36 monthsOn service creation

Always hourly: VM_SNAPSHOT, BS_SNAPSHOT, BACKUP, BS_BACKUP, BANDWIDTH, ACCOUNT_TEMPLATE, ISO

See Billing Cycles.

Key billing rules (summary)​

RuleSetting
IP charged separately from VM (recommended)Default / deprecated plan_ip_billing = true — bill via IP Address packages; do not rely on bundling IPs into the VM package
Free bandwidth allowanceCloud Provider Setup → Free Bandwidth Threshold
Custom package minimum priceUnit pricing ≥ predefined package
Coupon discount durationFirst billing cycle only
Tax exempt (testing)Customer → Billing Setup → Is Tax Exempted?

See Billing Rules.

Pricing formulas​

CMP derives hourly and yearly prices from monthly using 30.5 × 24 = 732 hours per month.

See Pricing Formulas.

Failed Transactions & Retry Policies (Prepaid vs. Postpaid)​

A common operational question from providers and customers is:

"Does CMP retry a failed or timed-out transaction (such as a payment or balance_modify call)? If yes, with what policy — count, backoff, maximum window?"

The answer depends directly on the Payment Mode and whether the operation is user-initiated or system-automated:

1. Prepaid Accounts (Wallet)​

  • Customer-Initiated Wallet Top-Ups: In standard Prepaid mode, customers manually add funds to their wallet (Infra Credits) using a payment gateway. Because this is an interactive session, any failure (card decline, 3DS authentication failure, bank timeout) is communicated immediately to the customer on screen. CMP does not execute automated background retries for failed customer top-up transactions.

2. Postpaid Accounts (Saved Card Auto-Charge Retries)​

In Postpaid mode, CMP generates payable invoices for consumed usage and automatically attempts to charge the customer's saved payment method (credit/debit card). If the payment fails for any reason (e.g. invalid card, expired card, insufficient balance, gateway decline):

Policy ParameterValue / BehaviourWhere Configured
Retry ScheduleRetried once per day (24-hour interval via automated daily billing cron)Platform default cron
Maximum Retry AttemptsConfigured by platform setting invoice_no_of_attempts (e.g. 3 attempts)Settings → Billing Setup → Billing Settings
Backoff StrategyFixed daily retry (no exponential backoff; runs once every 24 hours)System billing scheduler
Failure / Frozen StateWhen all attempts fail, the invoice becomes Frozen; auto-charge stops, and notification emails are sentEmail templates: FrozenInvoiceCustomerNotification, FrozenInvoiceAdminNotification
ResolutionAdmin manually unfreezes the invoice after verification, or customer logs in and pays manuallyHandling Frozen Invoices

For complete workflow details, see Postpaid Auto-Charge Failure Workflow and Disciplinary Actions.

Documentation in this section​

Was this page helpful?
Found something that could be improved?