API Integration Setup: 1-2 days

WooCommerce × PrintHub — API integration with full flexibility

We don't (yet) offer an official WooCommerce plugin — instead, you get direct access to our REST API. More flexible, faster, future-proof.

Overview

For WooCommerce stores we rely on API integration rather than a plugin. That gives you full control over logic, mapping and error handling — without waiting on plugin release cycles. Two paths get you there: a custom webhook listener (PHP, Node.js, Python) or low-code tools such as Zapier, Make or Uncanny Automator.

Benefits

Why WooCommerce with PrintHub?

No vendor lock-in anxiety

You own the integration code. If our API changes, you tweak one function — no plugin release cycle involved.

Full control over business logic

Filter by category, SKU, shipping class or meta fields: decide yourself which WooCommerce orders go to PrintHub.

Same API used by Shopify partners

Build the integration layer once — and reuse it for other platforms (your own app, mobile store, B2B portal).

Sandbox mode for risk-free testing

Using your pk_test_ key you can simulate complete orders without a single sheet of paper being printed.

Setup

Live in 1-2 days

Step by step — from zero to your first automated order.

  1. 01

    Generate an API key in the PrintHub admin

    Sign in to the partner dashboard and create a sandbox key (pk_test_) plus a live key (pk_live_). Both are sent in the X-API-Key header.

  2. 02

    Configure a WooCommerce webhook on "Order Created"

    WooCommerce → Settings → Advanced → Webhooks. Event: "Order created" (or "Order paid", depending on the use case). The delivery URL is your own endpoint or a Zapier hook.

  3. 03

    Implement a translation layer

    Your endpoint receives the WooCommerce JSON, maps variants to PrintHub product IDs and calls POST /api/orders. Respond to errors with HTTP 500 — WooCommerce will then retry several times.

  4. 04

    Test with the sandbox key

    Set pk_test_ in your endpoint and place a test order. You get back an order ID visible in the sandbox dashboard — no print job triggered.

  5. 05

    Switch to the live key

    Swap pk_test_ for pk_live_, top up your wallet and register a webhook URL with PrintHub so you can write status updates (shipped, error) back into WooCommerce.

Features

What this integration can do

  • REST API (JSON, OAuth-free X-API-Key header)
  • Bulk orders: up to 20 jobs per request
  • Custom fields and meta data are passed through
  • Sandbox testing without production
  • Rate limit: 60 requests per minute
  • HPOS- and WPML-compatible
Code sample

Get started right away

Example: forward the WooCommerce "Order Created" webhook through your own Node.js function to PrintHub.

javascript api.print-hub.com
// Express-Handler (oder Vercel/Netlify/Cloudflare Worker)
// Empfängt WooCommerce Webhook "order.created" und leitet an PrintHub weiter

import express from 'express';

const app = express();
app.use(express.json());

app.post('/webhooks/woocommerce-order', async (req, res) => {
  const order = req.body;

  const items = order.line_items.map((line) => ({
    product_id: line.meta_data.find((m) => m.key === '_printhub_id')?.value,
    quantity: line.quantity,
    properties: {
      engraving: line.meta_data.find((m) => m.key === 'Gravur')?.value,
    },
  }));

  await fetch('https://api.print-hub.com/api/orders', {
    method: 'POST',
    headers: {
      'X-API-Key': process.env.PRINTHUB_KEY,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      external_id: String(order.id),
      customer: {
        name: `${order.shipping.first_name} ${order.shipping.last_name}`,
        street: order.shipping.address_1,
        zip: order.shipping.postcode,
        city: order.shipping.city,
        country: order.shipping.country,
      },
      items,
    }),
  });

  res.status(200).json({ ok: true });
});

app.listen(3000);
Frequently asked

What partners often ask us

Is there an official WooCommerce plugin?
No, deliberately not. A plugin has to cover every edge case — which leads to bloat. Using our API you build exactly what you need: one or two days of work up front, low maintenance afterwards.
Do I need my own developer?
For the initial setup: yes — a developer with Node.js/serverless experience, or an automation tool like Make/Zapier. The integration typically runs as a small webhook handler on Vercel, Netlify, Cloudflare Workers or AWS Lambda. After that it runs fully automatically.
Does this work with WPML and multilingual stores?
Yes. Our API expects product IDs rather than names — so language is irrelevant. Shipping to EU countries with country-specific taxes also works transparently.
Is this compatible with HPOS (High-Performance Order Storage)?
Yes. Our example hooks use the CRUD API (wc_get_order) which is optimised for HPOS — no legacy post-meta direct access.

Ready to connect WooCommerce with PrintHub?

In a 30-minute call we go over your setup, catalog and volume — and send you out with a concrete roadmap.