Skip to content

Get the billing account

How the organization pays, its card and limit, whether paid work is accepted in it, and whether it is stopped for billing.

Updated

get

https://cloud.cahaves.com/api/billing/account

Authorization

cahaves.cloud.sessionstringcookierequired

The session cookie Cloud sets when a customer signs in to the console with GitHub or Google. It is HttpOnly, so scripts cannot read it, and there are no API keys or tokens yet.

Headers

X-Cloud-Organizationstring<uuid>

The id of the organization the request works in, one the signed-in customer owns. Left out or empty, the request works in their oldest organization. Any other value answers 404 with `reason: "organization"`. A customer with no organization yet gets 409 "Create an organization first." from every route that works in one.

Example: "2f6c8e0a-4b1d-4e7f-9a3c-5d7e9f1b3a5c"

Responses

application/json

The billing account.

cardobject | nullrequired

The card Paddle keeps, as far as Cloud is told, never the number. For a few seconds after a card is added its fields can be null, until Paddle's notice brings them.

modestringrequired

card, the default, or invoice for an organization Cahaves bills by invoice.

Allowed values: "card""invoice"

detailsobjectrequired

standingobjectrequired

billing_stopobjectrequired

Whether the organization's paid services are stopped for billing, or are to be. A failed card charge, a month closed with no card, an overdue invoice or paid services run with no card on file stops them once its grace period has passed, and a month to date at the monthly limit stops them at once. The stop is the organization's alone and never holds the free application or the free database. It lifts once every cause has cleared, and Cloud then starts again exactly what it stopped. A stop for an unpaid month or for no card that lasts archives the paid services: a final backup of each, then the service deleted.

suspended_bystring | nullrequired

Who holds the account suspended, which holds every organization it owns, so this reads the same in each: operator, or null while nothing does.

Allowed values: "operator"null

monthly_billingbooleanrequired

True once the organization is billed by the month, which every organization is from 06:00 UTC on 14 October 2026.

invoice_currencystring | nullrequired

The currency an organization billed by invoice is billed in. Null for a card organization.

Allowed values: "USD""IDR"null

monthly_limit_centsintegerrequired

The organization's monthly limit, in whole US cents.

monthly_billing_fromstring<date-time> | nullrequired

When billing by the month starts or started for this organization, or null.

This is the billing of the organization the request works in (Authentication). Each organization pays on its own, so another of the customer's never shows here.

mode is card, the default, or invoice for an organization Cahaves bills by invoice, whose invoice_currency is USD or IDR. card is null until a card is on file for the organization, and never carries the number; for a few seconds after a card is added its fields can be null, until Paddle's notice brings them. monthly_billing is true once the organization is billed by the month, which every organization is from 06:00 UTC on 14 October 2026, and monthly_billing_from is when that starts or started. monthly_limit_cents is the organization's own limit.

suspended_by names who holds the account suspended, and reads the same in every one of its organizations, since a suspension holds them all: operator, or null.

billing_stop says whether the organization's paid services are stopped for billing, or are to be (Stopped for billing). state is clear when nothing calls for a stop, scheduled when something does and nothing is stopped yet, usually an unpaid month or no card in its grace period, stopped while they are stopped, and resuming once every cause has cleared and Cloud is starting them again. stopped_at is when the stop began. Each entry of causes is one thing that calls for it, oldest month first, then no card, and the limit last: cause is failed, no_payment_method, overdue, no_card or limit; statement_id and month name the month, while no card has a null statement_id and the month it began in, and the limit a null statement_id and the current month; since is when the cause began, for no card the first time Cloud found paid services running with no card on file, and stop_at when it stops the paid services, the grace period after since for a month or no card and since itself for the limit; in_force says whether stop_at has come; and the limit's month_to_date_cents and limit_cents are what it compared. archive_at is when a stop in force archives the organization's paid services (Archived for billing): set while state is stopped for an unpaid month or for no card, fixed when that cause was first in force, and null for a stop for the limit alone and in every other state. message is the sentence to show the customer, null when clear. The free application and the free database are never stopped.

standing.ok says whether paid work is accepted in this organization now. When it is not, standing.reason names why: no_card, unpaid or over_limit. Billing explains each. While the organization has an overdue invoiced statement, this reads it from the invoicing service first, at most once every 30 seconds for an organization, so standing counts a payment made or an invoice voided since the last hourly run.