Skip to content

v0.13.0

Latest

Choose a tag to compare

@mattdjenkinson mattdjenkinson released this 25 Nov 14:41
d6d4ef1

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 ChargeDraft resource holds lines staff can change until they send them. Nothing in a draft is billed. InvoiceRequest.spec.chargeDraftRef previews the invoice a draft would make, with Stripe's tax. The charge-admin and entitlement-viewer roles cover drafts. (#278)
  • Charges held until shortly before their invoice. Charge has an OnInvoice condition and status.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. A ServicePricing can have a description and staff-only notes. (#275)
  • Staff can edit contact details. The new billing.miloapis.com-account-editor role lets staff change a billing account's contact details and tax IDs, and nothing else: the webhook refuses other changes from holders of editContactDetails without manageSettings. manageSettings is added to Billing Admin, so customers keep full access. (#279)
  • Usage before discounts. UsageSpend gains amountBeforeDiscounts and discountAmount, per meter and in total. amount is 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