Customer Overrides
Customer Overrides allow to pin customers to different billing profiles other than the default. This is useful when you have different billing needs for different customers.
For example, you might want some customers to be billed via Stripe and others via bank transfer.
Pinning Customers to billing profiles
By default customers are pinned to the default billing profile. In case of different billing needs, some customers might need to be pinned to a different billing profile. Customer overrides allow for such pinning.
Customer overrides can be managed on the Customer page, or via API:
const override = await openmeter.billing.customers.createOverride(
'customer-id',
{
billingProfileId: 'target-billing-profile-id',
},
);
Effect of pinning
When an invoice is created, the effective billing profile is cloned into the invoice to ensure invoice immutability. Any subsequent changes to the billing profile will not affect invoices that are already in draft status or later stages of the invoice lifecycle.
Advanced use-cases
Enterprise billing
In case of mixed setups with self-serve and Enterprise contracts, it is desired to have different billing setup for different customers. Enterprise users usually prefer transfer based payments, with leaner payment due dates.
To achieve this, first create the following billing profiles:
-
Default SaaS billing profile:
- Payment method: Charge automatically via credit card
- Payment due after: 3 days
-
Enterprise customer billing profile:
- Payment method: Send invoice for bank transfer
- Payment due after: 30 days
Then Enterprise customers should be pinned to the Enterprise billing profile so that they get the different payment method.
Migrating between billing profiles or apps
Billing profiles are immutably tied to apps. Due to migration between different Stripe accounts or payment providers moving customers between OpenMeter supported billing providers can happen.
Migrating customers between billing profiles or apps requires a careful migration process, as the ongoing subscriptions must be billed correctly.
Here's how to safely migrate customers:
- Create a new billing profile that will serve as the target for migration.
- Ensure all existing customers are explicitly pinned to the old billing profile - this prevents any disruption during the migration process.
- Set the new billing profile as the default, which means any new customers will automatically use it.
- Finally, migrate existing customers one by one from the old billing profile to the new one, allowing you to monitor and control the migration process while maintaining service continuity.
Migrating customers to Stripe billing profile
If you are migrating customers to Stripe billing profile, you also need to ensure that that the OpenMeter customer entity has a Stripe customer ID and the Stripe customer has a valid payment method in Stripe. See Stripe Apps for more details.
You can set the Stripe customer ID and change the billing profile on the customer details page.
Migrating customers to a different billing profile
If you are migrating customers to a different billing profile, you need to ensure that the OpenMeter customer entity has a valid payment method in the new billing profile.