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

# Fix 402 out-of-credit errors

> What a 402 payment_required error means and how to restore access.

A `402` response with `payment_required` means your account has used all of its available credits. All requests that would consume credits return `402` until you have credits again.

## Confirm your credit balance

Check the `x-totallimit-remaining` response header or the **Usage** tab in the API Dashboard. See [Check your credit usage](https://docs.peopledatalabs.com/support/billing/check-credit-usage.md).

## Restore access

* **Free and Pro plans:** Upgrade from the API Dashboard. See [Compare plans and upgrade](https://docs.peopledatalabs.com/support/billing/compare-plans.md).
* **Enterprise plan:** Contact your Customer Success Manager to increase your limit.

## Avoid running out unexpectedly

### Set up usage alerts

Usage alerts email you when your credit usage for a product reaches a percentage threshold that you set.

1. Open the [Usage Reports](https://dashboard.peopledatalabs.com/settings/usage-alerts) tab in your API Dashboard settings.
2. Under **Usage Alerts**, select a product or **All products**.
3. Enter a threshold from 1 to 100 percent, then click **Add alert**. Repeat to add more thresholds.
4. On the [Notifications](https://dashboard.peopledatalabs.com/settings/notifications) tab, opt in to API usage report emails.

> [!WARNING]
>
> You don't receive usage alert emails until you opt in on the **Notifications** tab.

> [!NOTE]
>
> Free plans can set one usage alert for **All products**. To set multiple or product-specific alerts, [upgrade to Pro](https://docs.peopledatalabs.com/support/billing/compare-plans.md).

### Monitor usage in your code

* Monitor `x-totallimit-remaining` in your code and stop or alert before it reaches zero.
* For Search APIs, set `size` to the number of records you need. Each returned record costs one credit.


## Related topics

- [How credits work](https://docs.peopledatalabs.com/support/billing/how-credits-work.md)
- [Support](https://docs.peopledatalabs.com/support/index.md)
- [Fix 401 authentication errors](https://docs.peopledatalabs.com/support/troubleshooting/authentication-errors.md)
- [Fix 429 rate limit errors](https://docs.peopledatalabs.com/support/troubleshooting/rate-limit-errors.md)
- [Errors & Status Codes](https://docs.peopledatalabs.com/docs/errors.md)
