Billing Integration
Connect Meterd to Stripe, configure meter pricing, and monitor revenue from the dashboard.
Connecting Stripe
Meterd integrates with Stripe to automatically sync metered usage as line items on your customers' invoices.
Setup
- Navigate to Settings → Billing Integration.
- Enter your Stripe Secret Key (starts with
sk_live_orsk_test_). - Enter your Stripe Webhook Secret (starts with
whsec_). This is used to verify incoming webhook events from Stripe. - Click Save.
Meterd validates the credentials on save. If the connection fails, double-check that the key has the required permissions: read/write access to Customers, Subscriptions, Invoices, and Usage Records.
Webhook configuration
In the Stripe Dashboard, create a webhook endpoint. The webhook URL is shown on the Settings → Billing Integration page after connecting Stripe.
Subscribe to the following events:
invoice.createdinvoice.finalizedcustomer.subscription.updated
Meter Pricing
Each meter can have a pricing configuration that determines how usage translates to revenue. Pricing is set per meter and applies to all customers unless overridden by a product catalog entry.
Configuration
You can configure pricing in two places:
- Meters → [meter] → Pricing section on the individual meter page.
- Settings → Billing Integration for a unified view of all meter pricing.
| Field | Description | Example |
|---|---|---|
base_price | Fixed charge per billing period, regardless of usage | $10.00 |
included_units | Number of units included in the base price at no extra cost | 1,000 |
overage_rate | Price per unit beyond the included units | $0.005 |
Example
A meter configured with a base price of $10, 1,000 included units, and a $0.005 overage rate would bill a customer who used 2,500 units as follows:
Base price: $10.00
Included units: 1,000 (no charge)
Overage: 1,500 × $0.005 = $7.50
─────────────────────────────────────────
Total: $17.50Revenue Dashboard
The dashboard overview shows estimated revenue calculated from usage multiplied by the pricing configuration for each meter.
What you'll see
- Total estimated revenue for the current billing period across all meters and customers.
- Per-meter breakdown showing usage volume, effective rate, and estimated charge.
- Per-customer breakdown with the ability to drill down into individual meter usage.
- Period-over-period trend chart comparing revenue across recent billing periods.
Syncing to Stripe
Usage data is synced to Stripe as metered usage records on the customer's subscription. You can trigger a sync in two ways:
Via the dashboard
- Go to Settings → Billing Integration or the individual customer page.
- Click Sync Now.
Via the API
curl -X POST https://api.meterd.io/v1/billing/sync \
-H "Authorization: Bearer mtd_adm_..." \
-H "Content-Type: application/json" \
-d '{
"customer_external_id": "cust_123"
}'The sync pushes the current period's aggregated usage for all meters associated with the customer. Stripe then includes these usage records on the next invoice.
Automatic sync
You can enable automatic syncing on a schedule from Settings → Billing Integration → Auto-Sync. When enabled, Meterd syncs usage for all customers at the configured interval (e.g., daily, hourly).