# AutoTopUpView

A tenant's auto top-up as its admins see it.

**Kind:** an object, used in responses.

## Fields

Every field is present in a response; empty ones are `null`.

| Field | Type | Description |
|---|---|---|
| `enabled` | `boolean` | Credit is bought automatically when the balance runs low. |
| `thresholdAmount` | `number` | Credit is bought when the balance falls below this. |
| `topUpAmount` | `number` | How much is bought each time. |
| `currency` | `string` | The currency of the amounts. |
| `hasSavedCard` | `boolean` | Whether a card was saved with a top-up. Without one, the billing account's default card is charged. |
| `lastSucceededAtUtc` | `datetime \| null` | When credit was last bought automatically. |
| `suspendedAtUtc` | `datetime \| null` | Set when a charge failed and auto top-up stopped; saving the settings again restarts it. |
| `suspendedReason` | `string \| null` | Why it stopped, as a stable code: `plan-cannot-top-up` (the plan can't buy credit), `no-payment-method` (there's no card to charge), or the card's decline code from the payment provider, such as `card_declined`, `insufficient_funds`, `expired_card` or `authentication_required`. Null while it's running. |

## Example

```json
{
  "enabled": false,
  "thresholdAmount": 0,
  "topUpAmount": 0,
  "currency": "...",
  "hasSavedCard": false,
  "lastSucceededAtUtc": "2026-10-26T12:00:00.0000000Z",
  "suspendedAtUtc": "2026-10-26T12:00:00.0000000Z",
  "suspendedReason": "..."
}
```

## Where it's used

- [`billing.autoTopUp`](https://docs.maitento.com/reference/api/billing.md) (`GET /billing/auto-top-up`)
- [`billing.setAutoTopUp`](https://docs.maitento.com/reference/api/billing.md) (`PUT /billing/auto-top-up`)
