/contracts/create
endpoint, entering the original contract details (for example, starting commit/credit balances and start date). Set the usage_statement_schedule.invoice_generation_starting_at
field to indicate when Metronome should begin generating invoices. In our example, that date is August 1, 2024, since the customer hasn’t been billed for August yet.
/contracts/createHistoricalInvoices
endpoint. All you’ll need is the quantities for each line item on the invoice. Metronome combines these with the unit prices specified on the contract to calculate the total amount on the invoice and the effects on the customer’s credit and commit balances.
preview
option to perform a dry run of the import to verify any differences between the existing and imported invoices before saving them.subtotals_with_quantity
field of the line item in lieu of the quantity
field. Specify the breakdown_granularity
of the invoice. When generating the invoice for the entire billing period, Metronome sums up the subtotals of each window.