Repository navigation
Staff can send several charges on one invoice, save charges as drafts and preview them, and edit a billing account's contact details. Usage spend now gives the amount before discounts and the discount.
What's new
- Charge groups. Charges invoiced now that share
spec.invoiceGroup(name,size) go on one invoice together. The billing provider holds them until all of them are added, so an invoice never goes out with only some of its lines. (#276) - Charge drafts. A new
ChargeDraftresource holds lines staff can change until they send them. Nothing in a draft is billed.InvoiceRequest.spec.chargeDraftRefpreviews the invoice a draft would make, with Stripe's tax. Thecharge-adminandentitlement-viewerroles cover drafts. (#278) - Charges held until shortly before their invoice.
Chargehas anOnInvoicecondition andstatus.removableUntil. The webhook refuses to remove a charge once it's on an invoice. (#274) - Supply dates and pricing notes. A one-time contract fee can carry a supply date (
servicePricingRefs[].servicePeriod), which becomes its invoice line's period. AServicePricingcan have a description and staff-only notes. (#275) - Staff can edit contact details. The new
billing.miloapis.com-account-editorrole lets staff change a billing account's contact details and tax IDs, and nothing else: the webhook refuses other changes from holders ofeditContactDetailswithoutmanageSettings.manageSettingsis added to Billing Admin, so customers keep full access. (#279) - Usage before discounts.
UsageSpendgainsamountBeforeDiscountsanddiscountAmount, per meter and in total.amountis still what's due. (#280) - Billing alerts go to the billing team (#262). The design says tiers carry on when an account changes Offer mid-period (#281).
Note
Adds the chargedrafts CRD and optional fields on charges, invoicerequests, offers, servicepricings, billingaccounts and usagequeries. Existing resources keep working without any conversion.
Deploy with openmeter-provider v0.7.0 and stripe-provider v0.3.0, before staff-portal v0.34.0 and cloud-portal v0.23.0. Staff need PolicyBindings for Charge, ChargeDraft and the account editor role to use the staff portal's charge and contact edit screens.
Full Changelog: v0.12.0...v0.13.0