unbillable_invoices_configuration to control contract invoices Metronome sends to a downstream billing provider. Invoices that are not sent are still finalized in Metronome, but they are marked unbillable during normal processing.
Common use cases include:
- Suppressing overage invoices for a prepaid customer.
- Suppressing scheduled invoices (i.e. commit installments) billed directly in a cloud marketplace.
unbillable_invoices_configuration is set on a customer billing provider configuration. To apply a policy to a contract, first create a billing provider configuration with the rules you want, then assign that configuration to the contract.
If you omit unbillable_invoices_configuration, it defaults to [] and all invoices are billable. Existing integrations are unaffected.
Define unbillable invoice rules
unbillable_invoices_configuration is an array of rules. Each rule identifies invoices that Metronome treats as unbillable.
An empty array,
[], is valid and means all invoices are billable.
Supported billing providers
Rule precedence
For a given invoice type, Metronome first looks for a rule that matches the invoice’sfiat_credit_type_id. If one exists, Metronome evaluates only that rule. If no currency-specific rule exists, Metronome evaluates the catch-all rule for that invoice type, if one is present.
Validation
Metronome validates rules when you create the billing provider configuration and returns an error if any of the following are violated:- Every rule must include
invoice_type, set toUSAGEorSCHEDULED. max_amount, when present, must be a positive number.- A rule with
max_amountmust includefiat_credit_type_id. - For the same
invoice_type, each fiat credit type can appear in at most one rule. - For the same
invoice_type, at most one catch-all rule can omitfiat_credit_type_id. - Marketplace configurations only support
SCHEDULEDrules.
Apply rules to a new contract
Suppress all overage invoices
Let’s walk through an example for suppressing all overage invoices for a prepaid customer: Step 1: Create the billing provider configurationbillable_status of unbillable.
Send overages over a fixed amount
Make USD usage invoices with totals up to 10 unbillable. USD usage invoices above 10 and all scheduled invoices remain billable.Example: Suppress scheduled invoices billed to a cloud marketplace
Apply rules to an existing contract
To change the policy on an existing contract, create a new billing provider configuration with the appropriate billable settings. Then, schedule a change to the customer billing provider configuration on the contract, replacing the existing configuration with the new one created.Constraints and considerations
Draft invoice totals can switch from unbillable to billable. For rules with
max_amount, Metronome evaluates the invoice’s current total, so a draft invoice’s billable_status can change as its total changes. Once an invoice is finalized, its total and billable_status are stable.You can manually send an unbillable Stripe invoice. In the Metronome app, an authorized user can click Send to Stripe to send an individual unbillable invoice. After the invoice is sent, its
billable_status is billable. This is only available for Stripe.Voided and regenerated invoices use the original period’s configuration. When Metronome voids and regenerates an invoice, the regenerated invoice uses the billing provider configuration from the invoice’s service period.