---
title: "get_billing"
canonical_url: "https://tweetstream.io/docs/api/agent-action-get-billing"
last_updated: 2026-11-05
---

# get_billing

Read each subscription's plan, price, status, renewal and the changes it offers, the open and recent stablecoin payments, and any open checkout. Tier read: the API key alone. The MCP tool of the same name needs the tweetstream:account scope.

Canonical URL: https://tweetstream.io/docs/api/agent-action-get-billing

## `POST /api/agent/actions/get_billing`

`https://tweetstream.io/api/agent/actions/get_billing`

## Authorization

| Name | Type | Description |
| --- | --- | --- |
| `Authorization` | `string`, required | Bearer authentication with your TweetStream API key: `Bearer <key>`. |

## Body

### Body example

```json
{}
```

## Response fields

| Name | Type | Description |
| --- | --- | --- |
| `openCheckouts` | `object[]`, required |  |
| `openCheckouts.canCancel` | `boolean`, required |  |
| `openCheckouts.expiresAt` | `string`, required | a string to be decoded into a Date |
| `openCheckouts.family` | `enum<string>`, required |  |
| `openCheckouts.rail` | `enum<string>`, required |  |
| `openCheckouts.state` | `enum<string>`, required |  |
| `openPayments` | `object[]`, required |  |
| `openPayments.amount` | `string`, required |  |
| `openPayments.canCancel` | `boolean`, required |  |
| `openPayments.cancelEndsSubscription` | `boolean`, required |  |
| `openPayments.canPayByCard` | `boolean`, required |  |
| `openPayments.expiresAt` | `string`, required | a string to be decoded into a Date |
| `openPayments.family` | `enum<string>`, required |  |
| `openPayments.kind` | `enum<string>`, required |  |
| `openPayments.state` | `enum<string>`, required |  |
| `openPayments.underReview` | `boolean`, required |  |
| `recentPayments` | `object[]`, required |  |
| `recentPayments.amount` | `string`, required |  |
| `recentPayments.createdAt` | `string`, required | a string to be decoded into a Date |
| `recentPayments.family` | `enum<string>`, required |  |
| `recentPayments.kind` | `enum<string>`, required |  |
| `recentPayments.method` | `string`, required |  |
| `recentPayments.status` | `enum<string>`, required |  |
| `recentPayments.statusLabel` | `string`, required |  |
| `subscriptions` | `object[]`, required |  |
| `subscriptions.autoRenew` | `enum<string>`, required |  |
| `subscriptions.availableChanges` | `enum<string>[]`, required |  |
| `subscriptions.cancelAtPeriodEnd` | `boolean`, required |  |
| `subscriptions.family` | `enum<string>`, required |  |
| `subscriptions.openPayment` | `object`, required |  |
| `subscriptions.openPayment.amountCents` | `number`, required |  |
| `subscriptions.openPayment.dueAt` | `string`, required |  |
| `subscriptions.openPayment.kind` | `enum<string>`, required |  |
| `subscriptions.paidThrough` | `string`, required |  |
| `subscriptions.pause` | `object`, required |  |
| `subscriptions.pause.resumesAt` | `string`, required | a string to be decoded into a Date |
| `subscriptions.pause.startsAt` | `string`, required |  |
| `subscriptions.pause.state` | `enum<string>`, required |  |
| `subscriptions.periodEnd` | `string`, required |  |
| `subscriptions.plan` | `string`, required |  |
| `subscriptions.priceCents` | `number`, required |  |
| `subscriptions.rail` | `enum<string>`, required |  |
| `subscriptions.renewalPaymentPreparable` | `boolean`, required |  |
| `subscriptions.scheduledTermChange` | `object`, required |  |
| `subscriptions.scheduledTermChange.effectiveAt` | `string`, required | a string to be decoded into a Date |
| `subscriptions.scheduledTermChange.termMonths` | `number`, required |  |
| `subscriptions.state` | `enum<string>`, required |  |
| `subscriptions.status` | `enum<string>`, required |  |
| `subscriptions.statusDetail` | `object`, required |  |
| `subscriptions.statusDetail.amountCents` | `number`, required |  |
| `subscriptions.statusDetail.at` | `string`, required |  |
| `subscriptions.statusDetail.kind` | `enum<string>`, required |  |
| `subscriptions.termMonths` | `number`, required |  |

## Responses

| Status | Description | Headers |
| --- | --- | --- |
| `200` | Success |  |
| `400` | The input does not match the action's schema (INVALID_REQUEST) |  |
| `401` | Missing or invalid API key |  |
| `403` | The request carried a foreign Origin |  |
| `429` | Rate limit reached (RATE_LIMITED); retry after retryAfterSeconds |  |
| `503` | Temporarily unavailable; retry later |  |

### 200

```json
{
  "openCheckouts": [],
  "openPayments": [],
  "recentPayments": [],
  "subscriptions": [
    {
      "autoRenew": "on",
      "availableChanges": [],
      "cancelAtPeriodEnd": false,
      "family": "BASE",
      "openPayment": null,
      "paidThrough": "2026-11-29T12:00:00.000Z",
      "pause": null,
      "periodEnd": "2026-11-29T12:00:00.000Z",
      "plan": "Pro",
      "priceCents": 49900,
      "rail": "CARD",
      "renewalPaymentPreparable": false,
      "scheduledTermChange": null,
      "state": "card_active",
      "status": "active",
      "statusDetail": {
        "amountCents": 49900,
        "at": "2026-11-29T12:00:00.000Z",
        "kind": "renews"
      },
      "termMonths": 1
    }
  ]
}
```

### 400

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

### 401

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

### 403

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

### 429

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

### 503

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://tweetstream.io/api/agent/actions/get_billing \
  --header "Authorization: Bearer $TWEETSTREAM_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{}'
```

### JavaScript

```javascript
const response = await fetch("https://tweetstream.io/api/agent/actions/get_billing", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TWEETSTREAM_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});

console.log(response.status, await response.json());
```

### Python

```python
import os
import requests

response = requests.post(
    "https://tweetstream.io/api/agent/actions/get_billing",
    headers={"Authorization": f"Bearer {os.environ['TWEETSTREAM_API_KEY']}"},
    json={},
)

print(response.status_code, response.json())
```
