Create customer dashboards
Share Metronome invoices and usage data with your customers through customizable embeddable dashboards.
Invoice dashboard
The invoice dashboard allows your customers to view their current and historical invoices (draft, finalized, and voided), up to 90 days old.
The invoice dashboard supports showing or hiding invoice line items with zero usage. To control this, provide the optional dashboard_options
array with a key show_zero_usage_line_items
and value of true
or false
. The default is false
.
Usage dashboard
The usage dashboard shows usage metrics attached to a customer's current plan for the past 30, 60, or 90 days. Usage graphs are aggregated for plans that contain grouped products.
Credits dashboard
The credits dashboard shows credits grants issued to the customer. The credits dashboard also supports optionally hiding the grant name. To control this, provide the optional dashboard_options
array with a key hide_grant_name
and value of true
or false
. The default is false
.
Embed a dashboard
Use the Metronome API to retrieve an embeddable dashboard URL which can be displayed through an iframe within your internal billing UI.
- Create an API token (if you don't already have one)
- Use the
/dashboards/getEmbeddableUrl
endpoint to pass thecustomer_id
and specify the dashboard you want to display.
Create dashboards through the API
You can also create custom dashboards by pulling directly from the Metronome API:
- For usage data, the /customers/{customer_id}/billable-metrics and /usage/groups endpoints
- For invoicing data, the /customers/{customer_id}/invoices and /customers/{customer_id}/invoices/{invoice_id} endpoints
Override the color palette
The /dashboards/getEmbeddableUrl
endpoint supports a color_overrides
array to override the color palette and match your design. See the full list of colors.
The image demonstrates where Metronome uses each named color. For example, gray_dark
applies to standard text; primary_medium
applies to selected text.