Quick Start
Customer Billing Quick Start
12 min
this quick start walks you through a complete, working billing flow in amberflo by the end, you will have a meter capturing usage a pricing plan defining how that usage is charged a customer receiving an invoice based on that usage the goal is not to configure every option the goal is to get a simple, end to end flow working what you’ll build to make this concrete, assume a simple use case you want to charge customers based on api usage , where each request costs $0 01 you will track api requests using a meter create a pricing plan that charges per request assign that plan to a customer send usage and see it reflected on an invoice step 1 create a meter meters define what usage you are tracking navigate go to cost → configure → meters click create meter (top right) configure the meter fill in the following fields label use a descriptive name (for example api requests) api name auto generated from the labeluse the default unless you have a reason to change it must not contain spaces allowed letters, numbers, hyphens, underscores max 50 characters description (optional) add context if needed meter type select count add dimensions (optional but recommended) dimensions describe your usage in more detail examples endpoint (which api was called) region customer tier if you were tracking model usage, you might use model token type by default, workload is included you can ignore it for now create the meter click create you now have a meter ready to receive usage step 2 create a pricing plan pricing plans define how usage is turned into charges navigate switch to billing (top center toggle) go to the pricing page click create pricing plan configure the plan name example api usage plan billing period choose\ for simplicity, either is fine calendar monthly aligns with calendar dates monthly , or calendar monthly description (optional) click continue add a rate click add rate select usage based configure the rate meter select the meter you created (e g , api requests) rate model leave as per unit price enter 0 01 (one cent per unit) included / free units leave empty click continue , then save you now have a pricing plan that charges $0 01 per unit of usage step 3 create a customer and assign the plan create a customer go to customers (left navigation) click create customer fill in name example test customer customer id any unique identifier click save assign the pricing plan open the customer you just created find the pricing plans section (right side) click add plan configure plan select your pricing plan start date choose start of current billing period (recommended) click save the customer is now set up to be billed step 4 send usage now you will send usage to trigger billing navigate go back to cost → meters find your meter click event upload (far right) submit usage fill in customer select your test customer workload leave blank for now value enter a number (for example 100) dimensions (optional) if you added dimensions, provide values click ingest meter you have now sent usage tied to that customer step 5 verify the invoice go to billing open your customer you should now see a non zero invoice total charges reflecting the usage you just sent example 100 units × $0 01 = $1 00 what you just did you completed a full billing workflow defined what to measure (meter) defined how to charge (pricing plan) defined who to charge (customer) sent real usage generated billable charges this is the core loop of usage based billing in amberflo what’s next this was the simplest possible setup from here, you can expand into tiered or volume pricing free tiers and included usage multiple meters and composite pricing customer segmentation automated ingestion instead of manual uploads or move to the cost visibility quick start to understand how the same usage can be used to analyze internal costs
