Developer hub

StackFill API and embed docs.

Connect StackFill to storefronts, product pages, carts, and print-production workflows without rebuilding approved artwork in another design tool.

What you can do

  • Create and list templates from approved PDFs.
  • Map storefront product IDs and variants to live templates.
  • Create browser or server-minted embed sessions.
  • Save customer personalization back to a cart or order.
  • Render final PDFs through authenticated server calls.
  • Subscribe to webhook events for saved sessions and renders.

What it is not

  • Not a storefront, cart, MIS, or payment processor.
  • Not a browser-only final print renderer.
  • Not a way to expose secret API keys in frontend code.
  • Not a design-from-blank-canvas API.

Getting started in 5 minutes

1. Create a template 2. Publish or map it 3. Create an embed app 4. Open the widget 5. Store the returned fill ID

Browser widget quick start

Use this when the shopper personalizes before adding a product to cart.

<script src="https://cdn.stackfill.com/widget/v1.js" async></script>
<button
  data-stackfill-open
  data-stackfill-key="stackfill_live_pk_REPLACE_ME"
  data-stackfill-product="business-card"
  data-stackfill-variant="standard">
  Personalize
</button>

window.addEventListener('stackfill:saved', (event) => {
  cart.attach({ stackfill_fill_id: event.detail.fill.id });
});

Read the embed widget guide

Server-minted session quick start

Use this when your backend controls customer, cart, order, or metadata values.

curl https://api.stackfill.com/v1/embed/sessions \
  -H "Authorization: Bearer stackfill_live_sk_REPLACE_ME" \
  -H "Content-Type: application/json" \
  -d '{
    "external_product_id": "business-card",
    "external_cart_id": "cart_123",
    "customer": { "email": "customer@example.com" }
  }'

Read the server sessions guide

Authentication summary

Secret and restricted keys use Authorization: Bearer from your server. Publishable keys are browser-safe only with allowed origins and should be sent as X-StackFill-Publishable-Key.

Read authentication

Webhook summary

Webhook endpoints receive signed JSON events such as embed_session.saved and render.succeeded. Current delivery support records attempts; retries and redelivery endpoints are still being hardened.

Read webhooks