Read the organization's billing

The organization's plan, standing, card and how many invoices are overdue.

GET/v1/billing

The organization's plan, standing, card and how many invoices are overdue. Billing runs on a billing provider; this call reads what the account service keeps in step with it, so it answers while the billing provider is unreachable. mode says how Pod bills, the same for every organization: off (nothing is billed; setup is off and the card none), test (the billing provider's test mode) or live. Only a signed-in person whose role may read billing can call it; an API key answers person_required. A person in several organizations names one with the Pod-Organisation header.

For people only: a signed-in person's token makes this call. An API key is refused with person_required. The person's role must be one that may read billing.

Request

curl "https://api.pod.mapier.ai/v1/billing" \
  -H "Authorization: Bearer $POD_PERSON_TOKEN"

Answer

200. The organization's billing.

200
{
  "organisation": "org_3ahrz6dmv29gqy5ckt18fp",
  "mode": "off",
  "plan": "invited",
  "standing": "good",
  "setup": "off",
  "card": {
    "state": "none",
    "brand": null,
    "last_four": null,
    "exp_month": null,
    "exp_year": null
  },
  "overdue_invoices": 0,
  "allowance": null,
  "suggested_plan": null,
  "pending_change": null
}
FieldTypeAlwaysWhat it is
organisationstringYes
mode"off" | "test" | "live"YesHow Pod bills, the same for every organization.
plan"invited" | "free" | "pro"Yes
standing"good" | "past_due" | "suspended" | "closed"YesThe organization's standing; past due and suspended answer account_restricted on creates and wakes, and closed (its owner closed it) on every call.
setup"off" | "pending" | "ready" | "failed"YesWhether the billing provider holds the organization's customer and subscription.
cardBillingCardYes
overdue_invoicesintegerYesInvoices the billing provider reported overdue and not yet paid or voided. At least 0.
allowanceBillingAllowance | nullYesThe free plan's allowance this month; null on any other plan.
suggested_planPlanSuggestion | nullYesA plan that fits the last 30 days better; null when none does.
pending_changePendingPlanChange | nullYesA move down or a cancel waiting for the end of the month; null when none waits.

Errors

The refusals this call is known for: person_required. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.

In the SDKs

ClientCall
TypeScriptpod.billing.get()
Pythonpod.billing.get()