---
title: "Get account details"
method: GET
path: "/_api/billing/account"
tags: ["Billing"]
---

# Get account details

`GET /_api/billing/account`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_api/billing/account/get.ts> (a function with typed inputs; its response is checked against the schema)

Get account details (plan, contact and payment settings) for given tenant.

 **Note**: this API is not applicable for system tenants.

## Headers

- `tenant` string, string

## Response `200`

Successfully fetched account details.

- ResponseBillingAccountGet
  - `code` number
  - `error` boolean
  - `data` object
    - `created_at` string
    - `plan` object
      - `attribution` string: Attribution of the plan
      - `name` string: Name of the plan
      - `subscription` object: List of the subscription ID of the plan
      - `target` string: Target where billing data is uploaded. E.g. Stripe, AWS S3.
    - `subscription_id` string: If target is Stripe, subscription ID is returned by Stripe. If not, it's empty
    - `customer_id` string: If target is Stripe, customer ID is returned by Stripe. If not, it's empty
    - `contact` object
      - `firstname` string
      - `lastname` string
      - `email` string
      - `phone` string
      - `line1` string
      - `line2` string
      - `city` string
      - `state` string
      - `country` string
      - `zipcode` string

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `401`: Failed because you do not have administrator permissions.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
