Skip to content

INSUFFICIENT_CREDITS — Organization out of credits

The request would charge more credits than the org has, and this plan doesn’t allow the balance to go negative. The request was rejected before any coding happened — no partial charge.

402 Payment Required. Standard envelope.

{
"success": false,
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Your organization has 12 credits remaining but this request requires 80.",
"request_id": "req_01HXJZK4ABCDEF",
"doc_url": "https://docs.surveycoder.io/errors/insufficient-credits"
}
}
  • The org used up its credits and hasn’t topped up.
  • A larger-than-expected batch (e.g. an import) pushed the estimate above the remaining balance.
  • A plan downgrade reset the balance.
  1. Top up at surveycoder.io/billing. Top-ups apply instantly.
  2. Or wait for the next renewal date if you’re on a plan with monthly credit grants.
  3. Before sending big jobs, estimate first with POST /v1/codebook/estimate — it costs 0 credits:
Terminal window
curl -X POST https://api.surveycoder.io/v1/codebook/estimate \
-H "x-api-key: $SCP_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "responses": ["..."] }'
  1. Subscribe to the balance.low webhook so you don’t get surprised — it fires at 100 credits remaining by default.