# CLI: Billing and databases
Source: https://sovaria.in/docs/cli-billing-and-infrastructure

Read plans, subscriptions and usage, and manage your project databases (backups, pause, resume, resize) with sov.

## sov billing

Billing plans, subscriptions, and usage

### sov billing plans
`sov billing plans [OPTIONS]`
List public billing plans.

### sov billing plan
`sov billing plan [OPTIONS] NAME`
Fetch one billing plan by name.

### sov billing subscription
`sov billing subscription [OPTIONS] [ORG_ID]`
Fetch the active subscription for an organisation.

### sov billing set-subscription
`sov billing set-subscription [OPTIONS] ORG_ID`
Create or update an organisation subscription.

### sov billing cancel-subscription
`sov billing cancel-subscription [OPTIONS] ORG_ID`
Cancel an organisation subscription.

### sov billing usage
`sov billing usage [OPTIONS] [ORG_ID]`
Fetch usage counters for an organisation.

### sov billing usage-history
`sov billing usage-history [OPTIONS] [ORG_ID]`
Fetch historical usage for an organisation.

### sov billing subscriptions
`sov billing subscriptions [OPTIONS]`
List all subscriptions (platform admin).

### sov billing invoices
`sov billing invoices [OPTIONS] [ORG_ID]`
List invoices for an organisation.

### sov billing compute
`sov billing compute [OPTIONS] ORG_ID`
Fetch compute usage breakdown for an organisation.

### sov billing build-invoice
`sov billing build-invoice [OPTIONS] ORG_ID`
Build an invoice for an organisation billing period.

### sov billing checkout
`sov billing checkout [OPTIONS]`
Create a hosted billing checkout session.

### sov billing provider
`sov billing provider [OPTIONS]`
Show the active billing payment provider.

### sov billing fx
`sov billing fx [OPTIONS]`
Fetch billing FX rates.

### sov billing overage
`sov billing overage [OPTIONS] [ORG_ID]`
Fetch overage billing details for an organisation.

### sov billing open-invoice
`sov billing open-invoice [OPTIONS]`
Fetch the caller's open invoice for the scoped organisation.

### sov billing pay-invoice
`sov billing pay-invoice [OPTIONS] ORG_ID PERIOD`
Pay an invoice for an organisation billing period.

### sov billing addons
`sov billing addons [OPTIONS]`
Add-ons on your billing account: price, paid units, what renews, autopay.

### sov billing addon-renew
`sov billing addon-renew [OPTIONS] ADDON_ID RENEW_QUANTITY`
Change how many units of an add-on renew.
Paid units keep working until the period ends.

To add units, pay in the console: Organization › Billing › Add-ons & autopay.

### sov billing autopay
`sov billing autopay [OPTIONS]`
Show the autopay mandate, or remove it with --remove.
Set it up in the console (₹1, refunded).

### sov billing wallet
`sov billing wallet [OPTIONS]`
The wallet: cash, promotional credit, runway, the zero state and recent movements.

### sov billing topup
`sov billing topup [OPTIONS]`
Print the console link that tops up the wallet (the CLI never takes a card).

### sov billing forecast
`sov billing forecast [OPTIONS]`
Pay-as-you-go spend this period and where it lands by the period's end.

### sov billing auto-recharge
`sov billing auto-recharge [OPTIONS]`
Show or change auto-recharge from your autopay mandate (24 h pre-debit notice; at most ₹15,000 a debit).

### sov billing razorpay create-order
`sov billing razorpay create-order [OPTIONS]`
Create a Razorpay order for self-serve checkout.

### sov billing razorpay verify
`sov billing razorpay verify [OPTIONS]`
Verify a Razorpay payment signature and activate the plan.

### sov billing account get
`sov billing account get [OPTIONS] ACCOUNT_ID`
Fetch a billing account.

### sov billing account cancel
`sov billing account cancel [OPTIONS] ACCOUNT_ID`
Cancel a billing account subscription.

### sov billing account resume
`sov billing account resume [OPTIONS] ACCOUNT_ID`
Resume a cancelled billing account.

### sov billing spend-cap
`sov billing spend-cap [OPTIONS]`
The monthly spend cap on usage beyond the plan

### sov billing spend-cap set
`sov billing spend-cap set [OPTIONS]`
Set the cap: the plan default, an amount, or (explicitly) none.

## sov governance

Platform governance and tenant databases

### sov governance regions
`sov governance regions [OPTIONS]`
List configured governance regions.

### sov governance regions-available
`sov governance regions-available [OPTIONS]`
List regions with available capacity for provisioning.

### sov governance region-patch
`sov governance region-patch [OPTIONS] REGION_ID`
Patch governance region metadata.

### sov governance tenants
`sov governance tenants [OPTIONS]`
List registered tenants.

### sov governance tenant-get
`sov governance tenant-get [OPTIONS] ORG_ID`
Fetch one tenant record.

### sov governance tenant-status
`sov governance tenant-status [OPTIONS] ORG_ID`
Update tenant lifecycle status.

### sov governance tenant-databases
`sov governance tenant-databases [OPTIONS] ORG_ID`
List databases provisioned for a tenant.

### sov governance db-provision
`sov governance db-provision [OPTIONS] ORG_ID`
Provision a dedicated database for a tenant project.

### sov governance db-connection
`sov governance db-connection [OPTIONS] ORG_ID PROJECT_ID`
Fetch database connection metadata (password redacted).

### sov governance db-connection-reveal
`sov governance db-connection-reveal [OPTIONS] ORG_ID PROJECT_ID`
Reveal database password using an active JIT grant.

### sov governance db-pause
`sov governance db-pause [OPTIONS] ORG_ID PROJECT_ID`
Pause a tenant database.

### sov governance db-resume
`sov governance db-resume [OPTIONS] ORG_ID PROJECT_ID`
Resume a paused tenant database.

### sov governance db-resize
`sov governance db-resize [OPTIONS] ORG_ID PROJECT_ID`
Resize a tenant database compute profile.

### sov governance db-reconcile
`sov governance db-reconcile [OPTIONS] ORG_ID PROJECT_ID`
Backfill tenant Postgres mirrors (policies, functions, platform schemas).

### sov governance db-backups
`sov governance db-backups [OPTIONS] ORG_ID PROJECT_ID`
List database backups for a tenant project.

### sov governance db-backup-trigger
`sov governance db-backup-trigger [OPTIONS] ORG_ID PROJECT_ID`
Trigger a manual database backup.

### sov governance db-compare
`sov governance db-compare [OPTIONS] ORG_ID PROJECT_ID`
What changed in the database between two moments: schema objects and rows per table (reads only).

### sov governance db-restore
`sov governance db-restore [OPTIONS] ORG_ID PROJECT_ID BACKUP_ID`
Replace the project's data with a backup (safety backup first; undo with db-restore-undo for 7 days).

### sov governance db-restores
`sov governance db-restores [OPTIONS] ORG_ID PROJECT_ID`
Database restores: status, backup used and until when each can be undone.

### sov governance db-restore-undo
`sov governance db-restore-undo [OPTIONS] ORG_ID PROJECT_ID RESTORE_ID`
Put back the database as it was right before a restore.

### sov governance db-delete
`sov governance db-delete [OPTIONS] ORG_ID PROJECT_ID`
Delete a tenant database (optionally after snapshot).

### sov governance hosts
`sov governance hosts [OPTIONS]`
List governance hosts.

### sov governance host-patch
`sov governance host-patch [OPTIONS] HOST_ID`
Patch governance host metadata.

### sov governance project-metrics
`sov governance project-metrics [OPTIONS] [PROJECT_ID]`
Fetch governance metrics for one project.
