# Get billing summary

> Source: https://truto.one/docs/api-reference/admin/billing/summary/

`GET /billing/summary`

Resource: **Billing**

## Query parameters

- **`team_id`** _(string, required)_
  The team to summarise. The caller must be an admin of this team.

## Response body

- **`account`** _(object)_
  - **`team_id`** _(string)_
  - **`stripe_customer_id`** _(string)_
  - **`has_stripe_customer`** _(boolean)_
  - **`has_payment_method`** _(boolean)_
  - **`billing_status`** _(string)_
    Informational; nothing is enforced on it today.
    Allowed: `active`, `past_due`, `suspended`, `exempt`
  - **`billing_email`** _(string)_
  - **`currency`** _(string)_
  - **`payment_method_summary`** _(object)_
    - **`stripe_payment_method_id`** _(string)_
    - **`type`** _(string)_
    - **`brand`** _(string)_
    - **`last4`** _(string)_
    - **`exp_month`** _(integer)_
    - **`exp_year`** _(integer)_
  - **`billing_address`** _(object)_
    - **`name`** _(string)_
    - **`line1`** _(string)_
    - **`line2`** _(string)_
    - **`city`** _(string)_
    - **`state`** _(string)_
    - **`postal_code`** _(string)_
    - **`country`** _(string)_
  - **`tax_ids`** _(array<object>)_
    - **`type`** _(string)_
    - **`value`** _(string)_
  - **`last_synced_at`** _(string)_
  - **`last_payment_failed_at`** _(string)_
- **`plan`** _(object)_
  - **`team_id`** _(string)_
  - **`name`** _(string)_
  - **`is_active`** _(boolean)_
  - **`base_fee_cents`** _(integer)_
  - **`base_fee_interval`** _(string)_
    Allowed: `month`, `quarter`, `half_year`, `year`
  - **`base_fee_anchor_month`** _(integer)_
  - **`base_fee_description`** _(string)_
  - **`base_fee_discount_percent`** _(number)_
  - **`billing_mode`** _(string)_
    `automatic` invoices are generated by the daily billing run on `billing_day`; `manual` plans are invoiced by Truto staff.
    Allowed: `automatic`, `manual`
  - **`billing_day`** _(integer)_
    Day of the month (UTC) automatic invoices are issued.
  - **`components`** _(array<object>)_
  - **`effective_from`** _(string)_
    First calendar month (always the 1st) this plan bills.
  - **`created_at`** _(string)_
  - **`updated_at`** _(string)_
- **`current_period`** _(object)_
  Month-to-date usage priced against the plan. `null` when the team has no active plan.
  - **`period_start`** _(string)_
  - **`period_end`** _(string)_
  - **`usage`** _(object)_
    - **`counts`** _(object)_
      - **`connector`** _(integer)_
      - **`active_connection`** _(integer)_
      - **`api_call`** _(integer)_
      - **`superquery_account`** _(integer)_
    - **`details`** _(object)_
  - **`lines`** _(array<object>)_
    - **`key`** _(string)_
    - **`kind`** _(string)_
      Allowed: `base_fee`, `usage`, `fixed`
    - **`description`** _(string)_
    - **`quantity`** _(integer)_
      Units charged; for usage lines the number of blocks of `unit_size`.
    - **`unit_price_cents`** _(number)_
      Price per charged unit (per block for usage lines).
    - **`unit_size`** _(integer)_
      Usage lines only — units per block.
    - **`overage_quantity`** _(integer)_
      Usage lines only — measured minus included, before block rounding.
    - **`gross_amount_cents`** _(integer)_
      Amount before discount.
    - **`discount_percent`** _(number)_
    - **`discount_cents`** _(integer)_
    - **`amount_cents`** _(integer)_
      Net amount charged.
    - **`period_start`** _(string)_
    - **`period_end`** _(string)_
      Exclusive end (first day of the next period).
    - **`metric`** _(string)_
      Allowed: `connector`, `active_connection`, `api_call`, `superquery_account`
    - **`measured_quantity`** _(integer)_
    - **`included_quantity`** _(integer)_
  - **`estimated_total_cents`** _(integer)_
- **`next_invoice_date`** _(string)_
  Next date the daily billing run will invoice this team (its plan's `billing_day`). Null for manual or inactive plans.
- **`last_invoice`** _(object)_
  A Stripe invoice mirrored into Truto. Stripe remains the system of record; use `hosted_invoice_url` to view or pay it.
  - **`id`** _(string)_
    Truto's id for the mirrored invoice row.
  - **`team_id`** _(string)_
  - **`stripe_invoice_id`** _(string)_
  - **`stripe_customer_id`** _(string)_
  - **`source`** _(string)_
    `automated` when Truto generated it from a plan; `stripe_manual` when it was raised by hand in Stripe.
    Allowed: `automated`, `stripe_manual`
  - **`status`** _(string)_
    Raw Stripe invoice status.
    Allowed: `draft`, `open`, `paid`, `void`, `uncollectible`
  - **`number`** _(string)_
  - **`currency`** _(string)_
  - **`amount_due_cents`** _(integer)_
  - **`amount_paid_cents`** _(integer)_
  - **`amount_remaining_cents`** _(integer)_
  - **`period_start`** _(string)_
  - **`period_end`** _(string)_
  - **`hosted_invoice_url`** _(string)_
    Stripe-hosted page to view and pay the invoice.
  - **`invoice_pdf`** _(string)_
  - **`stripe_created_at`** _(string)_
  - **`finalized_at`** _(string)_
  - **`paid_at`** _(string)_
  - **`voided_at`** _(string)_
  - **`attempt_count`** _(integer)_
  - **`last_payment_error`** _(string)_

## Code examples

### curl

```bash
curl -X GET 'https://api.truto.one/billing/summary' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.truto.one/billing/summary', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/billing/summary"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

response = requests.get(url, headers=headers, params=params)
print(response.json())
```
