Usage & billing

Inspect current-plan usage and start a subscription from your server integration.

Retrieve usage

GET /usage · response 200

JSON
{"data":{"plan":"growth","billing_status":"active","period_start":"2026-07-01T00:00:00+00:00","period_end":"2026-08-01T00:00:00+00:00","active_hostnames":18,"peak_hostnames":22,"included_hostnames":200,"overage_hostnames":0,"estimated_overage_cents":0,"bandwidth_bytes":4200000000,"bandwidth_gb":4.2,"included_bandwidth_gb":100}}

active_hostnames excludes deleting and suspended resources. Domain overages use peak_hostnames and cost €0.15 per domain above the included limit. Bandwidth is measured but not billed.

Create a Checkout session

POST /billing/checkout-session · scope billing:write · response 201

Field Type Required Description
plan enum yes starter, growth, or scale
success_url URI no Return URL after successful payment
cancel_url URI no Return URL after cancellation
BASH
curl -X POST https://api.subdomain.to/v1/billing/checkout-session \
  -H "Authorization: Bearer $SUBDOMAIN_TO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"plan":"growth"}'

Return URLs are controlled by subdomain.to. Use `POST /billing/portal-session` for invoices, tax details, payment methods and cancellation, and `POST /billing/plan` with `{"plan":"scale"}` to change plan.

The response contains the Stripe session ID and its url. This route currently does not use Idempotency-Key.