PrintBase
  • Product
  • Pricing
  • Docs
  • Resources
PrintBase/Guides/Printing troubleshooting

How to know a print job actually printed

HTTP 201 means the job was queued. Completed means the agent reported success. Poll the job, or use a paid-plan webhook for the terminal events.

For Developers who treated HTTP 200 as paper

This page in another language: 中文

Overview

Create returns id and status queued. The documented path is queued, then dispatched, printing, and completed. A terminal failure carries a reason code: AGENT_OFFLINE, PRINTER_OFFLINE, DOWNLOAD_FAILED, PRINT_ERROR, or INVALID_CONTENT. The Windows spooler can also surface codes such as PAPER_OUT or HEAD_OPEN when it reports them.

Poll GET /v1/print-jobs/{id}. The body includes status and printer_code. It does not include the original base64 content. Paid plans can register a webhook for print_job.completed and print_job.failed only. Creating a webhook on the free plan returns 403 PLAN_LIMIT_EXCEEDED.

The webhook signature is X-PrintBase-Signature, an HMAC of the timestamp and the raw body. That is how you know the callback is yours. It is not sent for intermediate statuses.

Integration steps

  1. 01

    Store the job id

    Write it on the order when you receive the 201. Use POST /v1/print-jobs with Authorization: Bearer and the printer_code from GET /v1/printers.

  2. 02

    Poll or subscribe

    Free plan: GET. Paid plan: webhook for the two terminal events, plus poll as a backstop.

  3. 03

    Branch on status

    completed is the success you can show. A reason code is the failure you can show.

  4. 04

    Do not reprint on every poll

    Reprint is a new POST with a new key. Use POST /v1/print-jobs with Authorization: Bearer and the printer_code from GET /v1/printers.

Node.js — read job status

// Create, then read the job
const created = await fetch('https://api.printbase.cloud/v1/print-jobs', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.PRINTBASE_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': jobKey,
  },
  body: JSON.stringify({
    printer_code: Number(process.env.PRINTER_CODE),
    content_type: 'raw',
    content: Buffer.from(payload).toString('base64'),
    copies: 1,
  }),
}).then(async (res) => {
  if (!res.ok) throw new Error(await res.text());
  return res.json();
});

const status = await fetch(`https://api.printbase.cloud/v1/print-jobs/${created.id}`, {
  headers: { Authorization: `Bearer ${process.env.PRINTBASE_API_KEY}` },
}).then((res) => res.json());
// status.status moves queued -> dispatched -> printing -> completed

Details for this setup

Webhook events

Only print_job.completed and print_job.failed. Not queued, not dispatched. The agent prints only what you send; it does not fetch the document from the platform for you.

Signature

HMAC-SHA256 over timestamp.rawBody using the endpoint secret. Verify the raw body, not re-serialized JSON.

Questions

Is queued the same as printed?

No. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.

Does completed mean the customer took the paper?

It means the agent reported the print finished. A person can still lose the page. It does not mean a sensor saw a hand.

Free webhooks?

No. 403 PLAN_LIMIT_EXCEEDED. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.

Idempotent create and status?

A replay returns the original job. Poll that same id. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.

Related guides

  • The print agent keeps going offline

    AGENT_OFFLINE means the computer's agent is not connected. Sleep, network, and a stopped process are the usual causes. The printer itself is a different code.

  • Free cloud print API plans compared

    A factual look at free tiers you can verify: PrintBase's pricing page, PrintNode's pricing page, QZ Tray's license, and the shutdown of Google Cloud Print.

  • PrintNode alternative for a server-side print API

    Compare PrintNode's published client model with PrintBase. No plugin is required on either side of this page; you POST a print job.

Free plan: 100 jobs a month on one computer, no card.

Create a free accountRead the API docs
PrintBase

PrintBase connects your applications to physical printers anywhere - securely, reliably, and in real time.

Product
Receipt PrintingLabel PrintingDashboardDevicesWebhooks
Resources
DocsBlogStatusAPI ReferenceDownloadPrintBase vs PrintNodePrintNode PricingFAQ
Guides
All guidesIntegrationsPrintersCode samplesComparisonsUse casesTroubleshooting
Company
ContactSecurityPrivacy

© 2026 Aveniq Technologies OÜ. All rights reserved. PrintBase is a service of Aveniq Technologies OÜ.

PrivacyTermsRefunds