Read the organization's billing
The organization's plan, standing, card and how many invoices are overdue.
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.
{
"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
}| Field | Type | Always | What it is |
|---|---|---|---|
organisation | string | Yes | |
mode | "off" | "test" | "live" | Yes | How Pod bills, the same for every organization. |
plan | "invited" | "free" | "pro" | Yes | |
standing | "good" | "past_due" | "suspended" | "closed" | Yes | The 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" | Yes | Whether the billing provider holds the organization's customer and subscription. |
card | BillingCard | Yes | |
overdue_invoices | integer | Yes | Invoices the billing provider reported overdue and not yet paid or voided. At least 0. |
allowance | BillingAllowance | null | Yes | The free plan's allowance this month; null on any other plan. |
suggested_plan | PlanSuggestion | null | Yes | A plan that fits the last 30 days better; null when none does. |
pending_change | PendingPlanChange | null | Yes | A 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
| Client | Call |
|---|---|
| TypeScript | pod.billing.get() |
| Python | pod.billing.get() |