INSUFFICIENT_CREDITS — Organization out of credits
Summary
Section titled “Summary”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.
HTTP status
Section titled “HTTP status”402 Payment Required. Standard envelope.
Example response
Section titled “Example response”{ "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" }}Why this happens
Section titled “Why this happens”- 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.
How to fix it
Section titled “How to fix it”- Top up at surveycoder.io/billing. Top-ups apply instantly.
- Or wait for the next renewal date if you’re on a plan with monthly credit grants.
- Before sending big jobs, estimate first with
POST /v1/codebook/estimate— it costs 0 credits:
curl -X POST https://api.surveycoder.io/v1/codebook/estimate \ -H "x-api-key: $SCP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "responses": ["..."] }'- Subscribe to the
balance.lowwebhook so you don’t get surprised — it fires at 100 credits remaining by default.
Related
Section titled “Related”- Credits — the full primer on how charging works
TRIAL_LIMIT_EXCEEDED— same behavior for free trialsNEGATIVE_BALANCE— for negative-allowed plans