Billing accounts
The account that accumulates a customer's subscriptions, invoices and credits. Suspending halts billing without ending the relationship; closing ends it.
| Command | HTTP | Description |
|---|---|---|
billing-accounts list | GET /v1/billing_accounts | List billing accounts |
billing-accounts create | POST /v1/billing_accounts | Create a billing account |
billing-accounts get | GET /v1/billing_accounts/{id} | Get a billing account |
billing-accounts update | PATCH /v1/billing_accounts/{id} | Update a billing account |
billing-accounts delete | DELETE /v1/billing_accounts/{id} | Close a billing account |
billing-accounts close | POST /v1/billing_accounts/{id}/close | Close a billing account (POST /close) |
billing-accounts credits | GET /v1/billing_accounts/{id}/credits | List the account's credits |
billing-accounts entitlements | GET /v1/billing_accounts/{id}/entitlements | List the account's entitlements |
billing-accounts invoices | GET /v1/billing_accounts/{id}/invoices | List the account's invoices |
billing-accounts reactivate | POST /v1/billing_accounts/{id}/reactivate | Reactivate a billing account |
billing-accounts subscriptions | GET /v1/billing_accounts/{id}/subscriptions | List the account's subscriptions |
billing-accounts suspend | POST /v1/billing_accounts/{id}/suspend | Suspend a billing account |
Examples
--params carries query and path parameters (id, page, filters); --json carries the request body; --fields limits which fields come back — worth using on every list/get to save context. See Global flags for the full reference.
# List billing accounts
kobana billing billing-accounts list \
--fields "id,public_id,external_id,currency,billing_email"
# Get a billing account
kobana billing billing-accounts get --params '{"id": "BILLING_ACCOUNT_ID"}'
# Create a billing account
kobana billing billing-accounts create --json '{"customer": "CUSTOMER"}'
# Update a billing account
kobana billing billing-accounts update \
--params '{"id": "BILLING_ACCOUNT_ID"}' \
--json '{"external_id": "EXTERNAL_ID", "name": "NAME", "email": "EMAIL"}'
# Close a billing account (POST /close)
kobana billing billing-accounts close \
--params '{"id": "BILLING_ACCOUNT_ID"}' \
--json '{"reason": "REASON"}'
# Close a billing account
kobana billing billing-accounts delete \
--params '{"id": "BILLING_ACCOUNT_ID"}' \
--dry-run
Next steps
- Invoices
- Schema introspection — every parameter this resource accepts.