End-to-End Billing¶
End-to-End Billing with Omnistrate¶
Omnistrate provides a complete solution for usage-based billing for your SaaS Product. It provides the following features:
- Metering: Collect usage data for your SaaS Product
- Aggregation: Aggregate usage data across all the nodes of an instance and per customer
- Invoicing: Generate invoices for your customers
- Payment: Integrate with payment processors to collect payments
- Pricing plans: SaaS Providers can configure pricing plans for their SaaS Product and enforce quotas/restrictions per service-plan.
- Notifications: Notify customers about their invoices and show them the current usage.
- Payment collection: Receive payments to your account when customers accept their invoices.
Billing can be enabled for your Plan with the following steps:
- Enable Tenant Billing
- Connect Omnistrate with your Stripe Account (or bring your own billing provider)
- Configure pricing and billing provider for your Plan
- Configure quotas for your Plan (optional)
Invoices, Notifications and Payment collection are automated.
By enabling this, your customers will be able to track their usage and invoices through the customer portal. Your customers will have the ability to configure payments with Stripe and pay their invoices through the Customer Portal.
Enable Tenant Billing At Account Level¶
To enable tenant billing at account level, please navigate to the "FinOps Center > Tenant Billing" section. As a SaaS Provider, you can request Omnistrate to enable the feature.
When the feature is enabled, you will see the "Add Billing Provider" button. Click on it to configure your billing provider. You can choose between using Omnistrate's billing provider(Stripe) or bringing your own billing provider.
OmniBilling (Stripe)¶
Omnistrate provides a built-in billing provider that integrates with Stripe. This allows you to manage your customer billing workflow through Omnistrate, including usage metering, pricing configuration, quota management, automatic invoice generation and notifications, invoice management, and integration with payment processors.
You can configure your Stripe account and set up billing for your SaaS Product. To complete the Stripe enablement you need to configure your Stripe Account using “Stripe Connect”.
If you don't have a Stripe Account, you must set up a standard Stripe account. Enter all required business information, including address and payment details, so the platform can process payments successfully. For more information on how to create a Stripe account you can review the Stripe's Getting Started guideline.
Warning
Make sure to configure and save the Customer Portal properties, including your logo, data that will be requested from you customers (for instance Billing address for tax purposes) and accepted payment methods.
For more details on how we establish the connection, see the Stripe Documentation on how Stripe Connect works.
BYO-Billing Provider (Bring Your Own Billing Provider)¶
If you have an existing billing provider, you can integrate it with Omnistrate. This allows you to collect usage metering data from Omnistrate and integrate them with your billing system. You can enable the "Omnistrate Metering" feature at the plan level to collect usage data and export it to your S3/GCS bucket, which can then be processed by your billing system. This allows you to use Omnistrate for usage metering while keeping your existing billing system intact.
You will need to configure below properties to better display your billing provider in the Customer Portal:
- Name: The name of the billing provider.
- Logo: The logo of the billing provider.
- Balance Due Link: The link to the balance due page of the billing provider. This is where your customers will be redirected to pay their invoices.
Configure Pricing¶
Once the billing is enabled at an account level, you can configure the pricing for your SaaS Product at a per-plan basis. You can configure the pricing for the following pre-set dimensions:
- CPU Cores
- Allocated Memory
- Allocated Storage (depending on the service definition)
- Replicas
In addition, you can restrict your customers from creating an instance if they had not configured payment.
You can configure the pricing for your Plan through the UI or through the compose spec.
- Using the UI, navigate to the "Build Service > Plans" section and modify the Plan you want to configure.
- Using the compose spec, provide the
pricing
specifications under thex-omnistrate-service-plan
section in your Compose Specification. - Using the plan spec, provide the
pricing
specifications in your Plan Specification.
Here is an example of how to configure the pricing for your Plan:
pricing:
- dimension: cpu
unit: cores
timeUnit: hour
price: 0.01
- dimension: memory
unit: GiB
timeUnit: hour
price: 0.05
- dimension: storage
unit: GiB
timeUnit: hour
price: 0.02
- dimension: replica
timeUnit: hour
price: 0.10
pricing
: The usage-based pricing model of the Plan. It will be used to generate invoices at the end of the month. Make sure to enable tenant billing first before using this feature. For a detailed guide, see here. Please specify the pricing for the following dimensions:cpu
: The pricing is based on the CPU usage.unit
: (Optional) For now we only supportcores
. Defaults tocores
if omitted.timeUnit
: (Optional) For now we only supporthour
. Defaults tohour
if omitted.
memory
: The pricing is based on the amount of memory (RAM) used.unit
: (Optional) For now we only supportGiB
. Defaults toGiB
if omitted.timeUnit
: (Optional) For now we only supporthour
. Defaults tohour
if omitted.
storage
: The pricing is based on the amount of allocated storage.unit
: (Optional) For now we only supportGiB
. Defaults toGiB
if omitted.timeUnit
: (Optional) For now we only supporthour
. Defaults tohour
if omitted.
replica
: The pricing is based on the Replica usage.unit
: (Optional) For now we only supportreplicas
. Defaults toreplicas
if omitted.timeUnit
: (Optional) For now we only supporthour
. Defaults tohour
if omitted.
Info
To enable replica-based billing for custom tenancy plans, you need to explicitly label the pods you want to include in customer billing. For more details, please see the section below.
Configure Billing Providers¶
You will also need to choose the billing providers for your Plan. You can choose any billing providers that you have configured at the account level. And set the default billing provider that will be used for your new subscribers.
- Using the UI, navigate to the "Build Service > Plans" section and modify the Plan you want to configure.
- Using the compose spec, provide the
billingProviders
specifications under thex-omnistrate-service-plan
section in your Compose Specification. - Using the plan spec, provide the
billingProviders
specifications in your Plan Specification.
Here is an example of how to configure the billing providers for your Plan:
billingProviders:
- name: stripe
externalProductID: "prod_123"
enablePaywall: false
isDefault: true
- name: BYO Billing Provider # The name you set for your BYO billing provider when configuring tenant billing at account level
isDefault: false
billingProviders
: Configure billing providers for your service plan. Each provider supports different payment methods and billing integrations. All specified providers must be enabled for tenant billing at the account level.name
: The billing provider name. Usestripe
(case-insensitive) for Stripe integration or the name you set for your bring-your-own (BYO) billing provider.isDefault
: (Optional) Whether this provider is the default. Only one provider can be set as default. Defaults tofalse
.externalProductID
: (Stripe only) You can specify the billing product ID for your Plan. This can be used to identify the Plan in your billing system. The billing product ID is a unique identifier for the Plan and is used to track usage and generate invoices.enablePaywall
: (Stripe only) Whether a valid payment method is required for your customers to create resource instances. Possible options are:true
: Your customers must provide a valid payment method before consuming the service.false
(default): Your customers can consume the service without providing a valid payment method.
Note
Above configurations that applied to the Plan level won't be applied to the existing subscriptions. You can always manage and update the existing subscriptions to apply the new configurations at the FinOps Center > Tenant Pricing
section.
Configure Quotas¶
As part of the billing configuration, you can set quotas for your customers. If you use Stripe as your billing provider, you can restrict your customers from creating an instance if they had not configured payment by enabling the enablePaywall
option above. You can also set a maximum number of instances that your customers can create. This can be useful if you want to limit the number of instances that your customers can create based on their subscription plan.
- Using the UI, navigate to the "Build Service > Plans" section and modify the Plan you want to configure.
- Using the compose spec, provide the
maxNumberOfInstancesAllowed
specifications under thex-omnistrate-service-plan
section in your Compose Specification. - Using the plan spec, provide the
maxNumberOfInstancesAllowed
specifications in your Plan Specification.
Here is an example of how to configure the maximum number of instances for your Plan:
Note
Above configurations that applied to the Plan level won't be applied to the existing subscriptions. You can always manage and update the existing subscriptions to apply the new configurations at the FinOps Center > Tenant Pricing
section.
Configure Invoices¶
Once the billing is enabled, Omnistrate will automatically generate invoices in Stripe for your customers based on their usage at the end of the month. The invoices will be generated based on the usage data collected by Omnistrate and will be created in Draft for your review.
Optionally, you can provide a billing product ID for your Plan, which will be used to create the Plan product in Stripe.
- Using the UI, navigate to the "Build Service > Plans -> Modify Plan" and configure the
External product ID
in theBilling
section. - Using the compose spec, find the
externalProductID
specifications in the Compose Specification under thex-omnistrate-service-plan
section. - Using the plan spec, find the
externalProductID
specifications in the Plan Specification.
To manage the monthly invoices and approve them, navigate to "Manage Fleet" section of the UI and click on "Manage Invoices". If you would like to auto-approve all your generated invoices after a certain period, please request through support.
Note
Stripe will allow you to modify invoices in Draft mode. After the invoices are sent to customers you can create a revision, invalidating the previous invoice and creating a new one.
Customer Notifications¶
Stripe will automatically notify your customers about their Open invoices. The notifications will be sent to the email address provided by your customers.
Your customers will be able to track their usage and invoices through the customer portal. Your customers will have the ability to configure payments with Stripe and pay their invoices through the Customer Portal.
Enable replica-based billing in custom tenancy plans¶
This configuration is optional and only required if you plan to charge your customers based on the number of replicas in your pricing model. If replica-based billing is not part of your pricing strategy, you can skip this step entirely.
For OMNISTRATE_DEDICATED_TENANCY and OMNISTRATE_MULTI_TENANCY plans, all pods are automatically included in customer billing.
For CUSTOM_TENANCY plans (e.g., Helm, Operator, Kustomize), you must explicitly label the pods you want to include in customer billing. Add the following pod label (not an annotation) to your deployment manifests:
Only pods with this label will be billed. Pods without it will be excluded from customer billing.
Example: Adding the Label in a Deployment Manifest¶
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-app
spec:
replicas: 3
selector:
matchLabels:
app: example-app
template:
metadata:
labels:
app: example-app
omnistrate.com/include-customer-billing: "true"
spec:
containers:
- name: example-container
image: nginx:latest
In this example, the pod template includes the omnistrate.com/include-customer-billing: "true"
label under metadata.labels
. This ensures all pods created by this deployment are counted for billing.