Skip to content

The other locked template

Invoice PDF API

Same mill, second template. POST invoice JSON. Get application/pdf. Amounts are integer cents. Tax is whatever you send.

Slipmill’s invoice template is a branded invoice PDF, not a commercial invoice for customs and not a tax engine. You send line amounts, optional tax, and a total in integer cents. We print the numbers you posted.

We do not compute VAT, sales tax, or duties. We do not emit a customs commercial invoice. If you need those, calculate them in your system and send the cents.

Use template invoice on POST /v1/render. Same key, same fail-closed rules as packing slips.

Generate an invoice PDF from JSON

The invoice path is the packing-slip path with a second template name. POST /v1/render. Header x-sm-key. Body: template invoice, brand, and invoice data. The mill returns application/pdf, US Letter, synchronously. One request is one invoice.

You already have the bill-to, the line items, and the cents. The remaining work is usually a Word file, a theme block, or an HTML invoice nobody wants to keep. Skip that. Map the fields. Call the mill. Take the bytes.

invoice_id, date, optional due_date, bill_to, from, items with sku, name, qty, and unit_amount_cents. Optional tax_cents and notes. Currency is a label we print. We do not convert it. We do not fetch a rate.

Check the shape first on the invoice JSON validator. That tool does not render a PDF. A Slipmill key still owns /v1/render. Fail closed on a bad key, a bad body, or a spent Starter or Pro cap.

Paid plans drop the Slipmill footer. Starter prints a small one. Branding is brand.name, optional brand.accent, and on paid plans an optional https logo_url. The layout stays ours. You do not upload a plate.

Cents as sent

Every money field is an integer count of cents. 1800 is eighteen dollars. 650 is six dollars and fifty cents. We do not parse a dollar string. We do not guess a decimal. If you send 18 we print eighteen cents.

Line amount is qty times unit_amount_cents in your system. Send the unit. We print the unit. We do not re-total the page into a different number than the cents you posted. The sheet is a print of your payload, not a ledger.

tax_cents is the same rule. Zero means we print zero. A number means we print that number. We do not add it twice. We do not hide it. We do not pick a nexus.

Not a tax engine. Not a commercial invoice.

Slipmill does not calculate VAT, sales tax, GST, or duty. It does not file. It does not emit a customs commercial invoice. If a marketplace or a border clerk needs those, compute them upstream and send the cents, or use a product built for that job.

The invoice template is a branded billing PDF for the buyer. It is not a packing slip. It is not a freight packing list. It is not a carrier label. Two locked templates we own: packing-slip and invoice. Pick one per POST.

Integer cents, printed as sent
You sendWe print
1800$18.00
650$6.50
tax_cents 0$0.00 tax
tax_cents 144$1.44 tax

curl

POST /v1/render with x-sm-key. template invoice.

curl -X POST https://slipmill.com/v1/render \
  -H "x-sm-key: YOUR_SLIPMILL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "invoice",
    "brand": {
      "name": "Northline Goods",
      "accent": "#9E2A22"
    },
    "data": {
      "invoice_id": "INV-2208",
      "date": "2026-08-31",
      "bill_to": {
        "name": "Cedar & Pine Outfitters",
        "address": "440 Warehouse Ave, Dock 3",
        "city": "Newark",
        "region": "NJ",
        "postal": "07105",
        "country": "US"
      },
      "from": {
        "name": "Northline Goods",
        "address": "18 Mercer Street, Hoboken, NJ 07030"
      },
      "items": [
        {
          "sku": "TOTE-12",
          "name": "Canvas tote — natural",
          "qty": 12,
          "unit_amount_cents": 1800
        }
      ],
      "currency": "USD",
      "tax_cents": 0
    }
  }' \
  --output invoice.pdf

Questions

Integer cents. 1800 prints as $18.00. We do not accept a dollar string on the invoice template.

Two locked templates. POST /v1/render with x-sm-key.