# Get auto top-up

Billing

GET `/v1/billing/auto_topup`

The account's auto top-up: the pack it buys when the balance falls to its threshold, its monthly cap and what it charged this month, the saved card it charges, its latest top-up, and why it turned itself off, if it did. Free.

**Auth:** an API key with the `account:read` scope, or the dashboard session.

## Example

cURL:

```shell
curl 'https://socialtap.dev/v1/billing/auto_topup' \
  -H "x-api-key: $SOCIALTAP_API_KEY"
```

## Authorizations

`x-api-key`stringheaderrequired

Your API key, with the `account:read` scope. [Authentication](https://socialtap.dev/docs/authentication/index.md)

## Response

### 200

Get auto top-up

| Field | Type | Description |
| --- | --- | --- |
| `data` | `object` |  |
| `data.currency` | `string` | The currency of the amounts (ISO 4217).<br>One of `usd` |
| `data.enabled` | `boolean` | Whether a balance falling to threshold buys pack now. |
| `data.last_charge` | `object` or `null` | The latest top-up, whatever its outcome; null before the first. |
| `data.last_charge.amount_tax` | `integer` or `null` | The tax in amount_total (Stripe Tax: only where SocialTap collects it); null when amount_total is. |
| `data.last_charge.amount_total` | `integer` or `null` | Charged, tax included, in cents of currency; null when nothing was charged or before it is known. |
| `data.last_charge.created_at` | `string` (date-time) | When the balance crossed the threshold, RFC 3339 UTC. |
| `data.last_charge.credits` | `integer` | Credits the pack adds. |
| `data.last_charge.currency` | `string` | amount_total's currency (ISO 4217).<br>One of `usd` |
| `data.last_charge.id` | `string` | Top-up ID (atu_…): the ref of its credit_transaction, and on the Stripe payment's metadata. |
| `data.last_charge.message` | `string` or `null` | What the bank or Stripe said, for people; null when reason is. |
| `data.last_charge.object` | `string` | Always auto_topup_charge.<br>One of `auto_topup_charge` |
| `data.last_charge.pack` | `string` | The credit pack (catalog pack ID). |
| `data.last_charge.reason` | `string` or `null` | Why it failed (the off_reason it set) or was skipped (monthly_cap, trust_limit: it would have passed rolling_limit_cents); null otherwise.<br>One of `card_declined`, `authentication_required`, `no_card`, `billing_address_required`, `payment_failed`, `disputed`, `monthly_cap`, `trust_limit` |
| `data.last_charge.status` | `string` | processing (the charge is under way), succeeded (paid: its credits were added, once), failed (nothing charged: auto top-up turned off, see reason) or skipped (it would have passed the monthly cap or the 7-day limit: nothing charged, auto top-up stays on).<br>One of `processing`, `succeeded`, `failed`, `skipped` |
| `data.month_resets_at` | `string` (date-time) | Start of the next calendar month (UTC), when spent_this_month_cents starts again from 0. |
| `data.monthly_cap_cents` | `integer` or `null` | The most auto top-up charges in a calendar month (UTC), tax included, in cents of currency; a top-up that would pass it does not run (the owner is emailed). null until set up. |
| `data.notice` | `string` or `null` | What a person should know about the change just made, in a sentence to show them: the chosen pack can't run under rolling_limit_cents, say, so it will be skipped. It never refuses the change. Null otherwise, and on every read. |
| `data.object` | `string` | Always auto_topup.<br>One of `auto_topup` |
| `data.off_at` | `string` (date-time) or `null` | When it turned itself off, RFC 3339 UTC; null when off_reason is. |
| `data.off_message` | `string` or `null` | What the bank or Stripe said, for people; null when off_reason is. |
| `data.off_reason` | `string` or `null` | Why auto top-up turned itself off (null while on, or when a person turned it off): card_declined (the bank declined the charge), authentication_required (the bank asked the cardholder to confirm it: buy the pack in Billing, then turn auto top-up back on), no_card (no saved card), billing_address_required (Stripe Tax needs the card's billing address: add it in the payment settings), payment_failed (another payment error), disputed (a payment on this account was disputed: auto top-up turns on again only with a different card), bank_inquiry (a bank asked about a payment on this account, which is not yet a dispute: turn it back on when you are ready), plan_ended (it bought a monthly plan's top-up, and the plan ended). It never retries: fix the cause, then turn it on again.<br>One of `card_declined`, `authentication_required`, `no_card`, `billing_address_required`, `payment_failed`, `disputed`, `bank_inquiry`, `plan_ended` |
| `data.pack` | `string` or `null` | The credit pack each top-up buys (catalog pack ID); null until auto top-up is first set up. |
| `data.payment_method` | `object` or `null` | The saved card a top-up charges (the default card in the payment settings, else the newest); null when there is none, or when the payment processor could not be reached. |
| `data.payment_method.brand` | `string` | Card brand (visa, mastercard, amex, …). |
| `data.payment_method.exp_month` | `integer` | Expiry month (1–12). |
| `data.payment_method.exp_year` | `integer` | Expiry year. |
| `data.payment_method.last4` | `string` | The card number's last four digits. |
| `data.rolling_limit_cents` | `integer` | The most auto top-up charges in any 7 days, tax included, in cents, whatever monthly_cap_cents says: it grows with the payments that settled on this account, and support can lift it. A top-up that would pass it does not run (the owner is emailed); buying a pack by hand is never limited by it. |
| `data.rolling_spent_cents` | `integer` | What auto top-up charged in the last 7 days, tax included, counting a charge in progress, in cents. |
| `data.spent_this_month_cents` | `integer` | What auto top-up charged this calendar month, tax included, counting a charge in progress, in cents. |
| `data.threshold` | `integer` or `null` | Credits: a balance change that leaves the balance at or below this buys the pack, once until the balance is above it again. null until set up. |
| `meta` | `object` | The shared route meta (see the API reference introduction). |

### 400

400 Bad Request.

| Code | HTTP | Retry | Meaning | What to do |
| --- | --- | --- | --- | --- |
| `invalid_input` | 400 | No | A parameter is missing or malformed, or the link is not one this endpoint takes. | Fix the parameter named in param as the message says. For a link of the wrong kind, call an endpoint listed in details.endpoints, when there is one. |

### 401

401 Unauthorized.

| Code | HTTP | Retry | Meaning | What to do |
| --- | --- | --- | --- | --- |
| `unauthorized` | 401 | No | The x-api-key header is missing, or its key is unknown or revoked. On the dashboard's routes: the session cookie is missing or expired. | Send a valid API key in the x-api-key header. No key yet? A person gets one at details.signup_url; an AI agent follows details.agent_auth_url. |

### 403

403 Forbidden.

| Code | HTTP | Retry | Meaning | What to do |
| --- | --- | --- | --- | --- |
| `forbidden` | 403 | No | The API key is valid but may not make this request, and details.reason says why: the account is suspended, the key lacks the route's scope, waits for its owner to confirm it by email, has expired, or was used from an IP outside its allowlist, or a rotated key's previous secret was used for a call that needs the admin scope. A running job stops with it too when its account is suspended or the key that created it is revoked or expires. It is about the key, never the item: a private item is private_or_unavailable, also 403, so branch on the code. | Act on details.reason. suspended: contact [support](mailto:support@socialtap.dev). scope: use a key with details.required_scope. previous_secret: use the new secret. key_pending: have the owner open the emailed link. key_expired or key_revoked: create a new key. ip_not_allowed: call from an allowed IP. |

### 429

429 Too Many Requests.

| Code | HTTP | Retry | Meaning | What to do |
| --- | --- | --- | --- | --- |
| `rate_limited` | 429 | Yes, later | The account passed its runaway-protection ceiling: a high per-account limit that stops a broken client loop (plans have no rate limit). Requests without an API key (signup, the MCP server's tool listing and find_endpoint) are limited per IP address instead. It also stops an account whose failed requests in the last hour cost far more than its successful ones paid for: failures are free within a limit (the message says so), and successes raise it. | Wait the seconds in the retry-after header, then retry. If your steady traffic needs more, ask [support](mailto:support@socialtap.dev) to raise the ceiling; without an API key, send one. |

operationId `billing.auto_topup.get`

---

[HTML version](https://socialtap.dev/docs/reference/billing/auto-topup-get/) · [Docs index for AI agents](https://socialtap.dev/llms.txt) · [All docs in one file](https://socialtap.dev/llms-full.txt)
