> ## Documentation Index
> Fetch the complete documentation index at: https://docs.particle.pro/llms.txt
> Use this file to discover all available pages before exploring further.

# credits_depleted

> Credit allocation exhausted for this billing period

export const BillingLink = ({children}) => {
  return <a href="https://platform.particle.pro/billing">{children}</a>;
};

|                    |                        |
| ------------------ | ---------------------- |
| **HTTP status**    | `402 Payment Required` |
| **Error code**     | `credits_depleted`     |
| **Resolve action** | `upgrade_plan`         |

## What happened

The organization's credit allocation for the current billing period has been fully consumed. API requests are blocked until you upgrade to a higher plan, enable overage billing, or credits replenish at the start of the next billing period.

## How to fix

#### Option 1: Upgrade to a plan with more credits

```bash theme={"dark"}
curl -X PUT https://api.particle.pro/v1/organizations/{orgId}/billing/subscription \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"plan_id": "HIGHER_TIER_PLAN_ID"}'
```

#### Option 2: Enable overage billing

With a payment method on file, overage billing lets API access continue past the credit allocation — usage beyond your credits is charged in USD.

```bash theme={"dark"}
curl -X PATCH https://api.particle.pro/v1/organizations/{orgId} \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"overage_enabled": true}'
```

#### Option 3: Wait for credit replenishment

Credits are replenished at the start of each billing period. The block expires automatically when the new period begins.

Visit your <BillingLink>organization's billing settings</BillingLink> to view your current credit balance and billing period dates.
