PlanyDocs
Services

BillingService

plany.billing.v1.BillingService — prices, your balance, and what you spent it on.

Endpoint api.plany.cloud:443 · Guide · Reference

Plany is prepaid: your account holds a balance of credit, your plan adds credit each month, and what you run draws it down. This service tells you what things cost, what you have left, and where it went.

Prices

These need no credential, so you can price something before you have an account.

CallWhat it returns
ListPlans, GetPlanThe plans, their monthly price and the credit each includes.
ListSkus, GetSkuEvery price Plany charges. GetSku takes the full name, skus/{sku}.
EstimateCostWhat some usage would cost. Pass plan to compare plans, or account for your own rates.
grpcurl
grpcurl -d '{}' api.plany.cloud:443 plany.billing.v1.BillingService/ListPlans

Your balance

GetBillingAccount on accounts/{account}/billing returns your plan, your balance, the current period, your burn rate over the last day and, from that, when the balance is projected to run out.

Billing

Reading what you spent

CallWhat it returns
ListLedgerEntriesEvery grant and charge on the account, dated, each with an explanation of how it was priced.
QueryCostsSpend over an interval, grouped by SKU, project, region, service, day or hour.
plany billing costs

Adding credit and changing plan

Credit is bought, and plans are subscribed to, in the console: Billing → Add credit or Billing → Plans. Payment is taken on Stripe's own checkout page, so a card never passes through your code or Plany's API. plany billing topup prints the link.

Money

Every amount is google.type.Money — currency_code, units and nanos. An account's currency is fixed when it is created, and every amount on it uses that one. Add amounts up with integer arithmetic, never floating point.

Permissions

PermissionLets you
billing.accounts.getRead the balance and plan.
billing.ledgerEntries.listRead the ledger.
billing.costs.queryQuery costs.
billing.credit.purchaseBuy credit and subscribe to plans.