Usage and Metering
FoundryDB bills hourly based on the resources each service is consuming. Usage is tracked per organization, so all services owned by an organization appear on the same invoice.
How Metering Works
Every running service emits a usage snapshot once per hour. Each snapshot records:
- Compute: the CPU and memory tier the service is running on.
- Storage: the provisioned data volume size and tier (standard or maxiops).
- Backup storage: the space consumed by automated backups on object storage.
At the end of each billing month, snapshots are aggregated into a billing period and an invoice is generated. Any available promotional credit is applied before the card is charged.
Viewing Current Usage
Members with org:view_billing permission (owners and admins) can query the current month's usage:
curl -u user:password https://api.foundrydb.com/billing/usage
The response shows:
credit_balance: remaining promotional credit in USD.has_payment_method: whether a card on file exists.total_hourly_cost: combined hourly rate across all running services.total_monthly_cost: projected monthly cost at the current rate.current_period: aggregate cost breakdown for the open billing period.services[]: per-service breakdown.
{
"total_hourly_cost": 0.085,
"total_monthly_cost": 61.20,
"current_period": {
"status": "open",
"total_compute_cost": 42.00,
"total_storage_cost": 12.00,
"total_backup_cost": 7.20,
"total_cost": 61.20,
"currency": "USD"
},
"services": [
{
"service_name": "prod-postgres",
"database_type": "postgresql",
"plan_name": "tier-4",
"node_count": 2,
"storage_size_gb": 100,
"hourly_cost": 0.085,
"compute_hourly": 0.060,
"storage_hourly": 0.015,
"backup_hourly": 0.010
}
]
}
Billing Period History
To see past billing periods:
curl -u user:password https://api.foundrydb.com/billing/usage/history
Each period has a status of open (current month), finalized (month ended, invoice generated), or paid (invoice settled).
Per-Service Breakdown for a Period
curl -u user:password \
https://api.foundrydb.com/billing/usage/history/{period_id}/services
Returns per-service compute, storage, and backup costs for the specified period, along with the number of hourly snapshots billed.
Cost Timeline
Useful for rendering charts in dashboards:
curl -u user:password \
"https://api.foundrydb.com/billing/usage/history/{period_id}/timeline?granularity=daily"
The granularity parameter accepts hourly, daily (default), or weekly. Each bucket shows snapshot count and costs for that time interval.
Invoices
curl -u user:password https://api.foundrydb.com/billing/invoices
Invoices are listed most-recent first. Each invoice shows the subtotal, credits applied, final amount charged, payment status (draft, issued, paid, overdue, or cancelled), and a link to the hosted Stripe invoice page.
Pricing
The pricing schedule is public and does not require authentication:
curl https://api.foundrydb.com/billing/pricing
Prices are expressed as hourly rates in USD, with precomputed monthly equivalents for convenience. Storage and backup costs are charged per GB-hour.
Promotional Credits
Credits are applied automatically before card charges. To view your current balance:
curl -u user:password https://api.foundrydb.com/billing/credits
Credits are granted by the FoundryDB team (for trial programmes, refunds, or promotional bonuses) and cannot be self-applied.
How Costs Are Calculated
Each service's hourly cost is the sum of three components:
hourly_cost = compute_per_hour(plan)
+ storage_size_gb × storage_per_gb_hour
+ backup_size_gb × backup_per_gb_hour
For multi-node services, each node's compute cost is counted separately. Storage and backup costs are charged once per service, not per node.
Dashboard
The Billing section of the dashboard shows the current month's spend, a cost timeline chart, a per-service table, and a list of past invoices. The Usage tab updates on each page load and reflects hourly snapshots already recorded.