PPDFInvoiceAPI
DOCS/ Errors

API REFERENCE

Errors

Failed requests return a JSON error body instead of a PDF. Here's every code.

Error shape

Errors are JSON with a stable machine-readable error string and a human-readable message:

{
  "error": "template_not_found",
  "message": "No stored template with that id exists for your account."
}

Branch on the error field — the message wording may change, but the codes below are stable.

Status codes

StatusErrorMeaning
400bad_requestBody is not JSON, or neither html nor template was provided.
401unauthorizedMissing or invalid API key.
402payment_requiredOut of render credits. Upgrade your plan to continue.
404template_not_foundA stored template id (tpl_…) was passed that your account does not own.
429rate_limitedToo many requests — slow down and retry.

Handling errors

  • 401 — check the key and the Authorization: Bearer … header. See Authentication.
  • 402 — you're out of credits; upgrade in Billing. See Rate limits & credits.
  • 404 — the tpl_… id isn't one your account owns. See Templates.
  • 429 — back off and retry with exponential backoff.