---
title: "Insufficient prepaid credit (insufficient-credit)"
description: "PubNio insufficient-credit problem, HTTP 402: A publish's estimated cost is above zero and above the workspace's prepaid credit balance."
---

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

# Insufficient prepaid credit (insufficient-credit)

HTTP 402 Insufficient prepaid credit. A publish's estimated cost is above zero and above the workspace's prepaid credit balance.

## When it happens

2 operations declare it: [`POST /api/v1/posts`](https://pubnio.com/api/v1/docs#tag/posts/POST/api/v1/posts) and [`POST /api/v1/posts/{postId}/publish`](https://pubnio.com/api/v1/docs#tag/posts/POST/api/v1/posts/{postId}/publish).

## Response body

```json
{
  "type": "https://pubnio.com/docs/problems/insufficient-credit/",
  "status": 402,
  "title": "Insufficient prepaid credit",
  "detail": "Add prepaid credit before publishing this post.",
  "code": "insufficient_credit",
  "balanceMicros": 5000,
  "requiredMicros": 15000,
  "fundingUrl": "/app/1d3e5f70-2a4b-4c6d-8e0f-123456789abc/settings?tab=billing",
  "canManageBilling": true,
  "nextAction": "Open /app/1d3e5f70-2a4b-4c6d-8e0f-123456789abc/settings?tab=billing to add prepaid credit and retry.",
  "requestId": "0f8e4c2a-6b1d-4e3f-8a9b-7c6d5e4f3a21"
}
```

| Field              | Type    | Always present |
| ------------------ | ------- | -------------- |
| `balanceMicros`    | integer | Yes            |
| `requiredMicros`   | integer | Yes            |
| `fundingUrl`       | string  | Yes            |
| `canManageBilling` | boolean | Yes            |
| `nextAction`       | string  | Yes            |

## Recovery for agents

- Do what `nextAction` says.

## Retryable

No: the SDKs mark HTTP 402 not `retryable`.

## Limits

- Match on `type` or `code`, not on `detail`.

## Related

- [Billing problems](https://pubnio.com/docs/problems/#billing)
- [API reference](https://pubnio.com/docs/api/)

Source: https://pubnio.com/docs/problems/insufficient-credit/index.mdx
