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
curl 'https://socialtap.dev/v1/billing/auto_topup' \
  -H "x-api-key: $SOCIALTAP_API_KEY"
x-api-keystringheaderrequired

Your API key, with the account:read scope. Authentication

Response

application/json

200

Get auto top-up

dataobject
ShowHide 16 child fields
currencystring

The currency of the amounts (ISO 4217).

One ofusd

enabledboolean

Whether a balance falling to threshold buys pack now.

last_chargeobjectnullable

The latest top-up, whatever its outcome; null before the first.

ShowHide 11 child fields
amount_taxintegernullable

The tax in amount_total (Stripe Tax: only where SocialTap collects it); null when amount_total is.

amount_totalintegernullable

Charged, tax included, in cents of currency; null when nothing was charged or before it is known.

created_atstring date-time

When the balance crossed the threshold, RFC 3339 UTC.

creditsinteger

Credits the pack adds.

currencystring

amount_total's currency (ISO 4217).

One ofusd

idstring

Top-up ID (atu_…): the ref of its credit_transaction, and on the Stripe payment's metadata.

messagestringnullable

What the bank or Stripe said, for people; null when reason is.

objectstring

Always auto_topup_charge.

One ofauto_topup_charge

packstring

The credit pack (catalog pack ID).

reasonstringnullable

Why it failed (the off_reason it set) or was skipped (monthly_cap, trust_limit: it would have passed rolling_limit_cents); null otherwise.

One ofcard_declinedauthentication_requiredno_cardbilling_address_requiredpayment_faileddisputedmonthly_captrust_limit

statusstring

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).

One ofprocessingsucceededfailedskipped

month_resets_atstring date-time

Start of the next calendar month (UTC), when spent_this_month_cents starts again from 0.

monthly_cap_centsintegernullable

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.

noticestringnullable

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.

objectstring

Always auto_topup.

One ofauto_topup

off_atstring date-timenullable

When it turned itself off, RFC 3339 UTC; null when off_reason is.

off_messagestringnullable

What the bank or Stripe said, for people; null when off_reason is.

off_reasonstringnullable

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.

One ofcard_declinedauthentication_requiredno_cardbilling_address_requiredpayment_faileddisputedbank_inquiryplan_ended

packstringnullable

The credit pack each top-up buys (catalog pack ID); null until auto top-up is first set up.

payment_methodobjectnullable

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.

ShowHide 4 child fields
brandstring

Card brand (visa, mastercard, amex, …).

exp_monthinteger

Expiry month (1–12).

exp_yearinteger

Expiry year.

last4string

The card number's last four digits.

rolling_limit_centsinteger

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.

rolling_spent_centsinteger

What auto top-up charged in the last 7 days, tax included, counting a charge in progress, in cents.

spent_this_month_centsinteger

What auto top-up charged this calendar month, tax included, counting a charge in progress, in cents.

thresholdintegernullable

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.

metaobject

The shared route meta (see the API reference introduction).

400

400 Bad Request.

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.

unauthorizedNo retry

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.

forbiddenNo retry

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. 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.

rate_limitedYes, 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 to raise the ceiling; without an API key, send one.

operationId billing.auto_topup.get