Embedding usage and cost graphs from Orb into your platform
Last updated: September 13, 2024
There are two main approaches to displaying usage and cost data within your platform:
1. Embedding Orb's invoice or customer portals
The simplest method is to embed Orb's pre-built invoice or customer portals:
Use an iframe or direct link to Orb's invoice or customer portals. This method requires minimal setup and provides a ready-to-use interface that displays invoice usage and invoice cost data for each customer
For implementation details, refer to the Orb Invoice Portal documentation
2. Creating custom visualizations with Orb's API
For platforms that require more flexibility and customization, you can utilize Orb’s API endpoints to fetch usage or cost data and create your own visualizations. This approach allows for seamless integration with your existing analytics UI, offering more control over how data is presented to your users.
Endpoints for Custom Visualizations
• /v1/subscriptions/<subscription_id>/usage
• /v1/subscriptions/<subscription_id>/costs
• /v1/customers/<customer_id>/costs
• /v1/customers/external_customer_id/<external_customer_id>/costs
The endpoints listed above all support cached responses. Our documentation explains more about using cached responses.
Choose the method that best fits your platform's needs and technical capabilities. The embedded portal option offers quick implementation, while the API approach provides more control over the presentation and integration.