API Reference
One endpoint. Send JSON, receive a PDF. Authenticate with a Bearer key from your dashboard. Responses include X-Usage-Used and X-Usage-Quota headers.
Create a document
POST https://slipstack.dev/api/v1/pdf
Authorization: Bearer psk_live_xxx
Content-Type: application/json
{
"template": "invoice", // "invoice" | "receipt"
"options": { "format": "A4" }, // "A4" | "LETTER"
"data": {
"from": { "name": "Acme Inc", "address": "1 Market St", "email": "billing@acme.com", "logoUrl": "https://.../logo.png" },
"to": { "name": "Globex LLC", "email": "ap@globex.com" },
"number": "INV-1024",
"date": "2026-06-09",
"dueDate": "2026-07-01",
"currency": "USD",
"items": [
{ "description": "Consulting", "quantity": 10, "unitPrice": 150 }
],
"taxRate": 8.5,
"discount": 100,
"notes": "Thank you for your business.",
"accentColor": "#1f5be0"
}
}Node.js
const res = await fetch("https://slipstack.dev/api/v1/pdf", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SLIPSTACK_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ template: "invoice", data: invoice }),
});
const pdf = Buffer.from(await res.arrayBuffer()); // application/pdf
JSON response mode
// Add ?format=base64 or 'Accept: application/json' to get JSON instead of binary:
{
"pdf_base64": "JVBERi0xLjc...",
"bytes": 18234,
"template": "invoice",
"usage": { "used": 42, "quota": 1000, "plan": "starter" }
}E-invoices: Factur-X / XRechnung (EN 16931)
POST https://slipstack.dev/api/v1/einvoice (Pro & Scale plans)
Authorization: Bearer psk_live_xxx
Content-Type: application/json
{
"options": { "format": "xrechnung-cii" }, // or "facturx-pdf"
"data": {
// same shape as /api/v1/pdf, plus:
"from": { "name": "Acme SARL", "countryCode": "FR", // required
"vatId": "FR32123456789" }, // required if taxRate > 0
"to": { "name": "Globex GmbH", "countryCode": "DE" },// required
"number": "INV-1024", "date": "2026-06-09", "currency": "EUR",
"items": [ { "description": "Consulting", "quantity": 10, "unitPrice": 150 } ],
"taxRate": 20,
"paymentIban": "FR7630006000011234567890189", // optional
"paymentReference": "INV-1024", // optional
"buyerReference": "04011000-12345-67" // optional (XRechnung BT-10)
}
}
// "xrechnung-cii" -> application/xml (EN 16931 CII, XRechnung 3.0 guideline)
// "facturx-pdf" -> application/pdf with embedded factur-x.xml
// (returned format label: "facturx-hybrid (beta)" — the XML
// and attachment wiring are spec-correct, but the container
// is not certified PDF/A-3)Parse incoming e-invoices (CII & UBL)
POST https://slipstack.dev/api/v1/einvoice/parse (any paid plan)
Authorization: Bearer psk_live_xxx
Content-Type: application/xml
<raw CII or UBL e-invoice XML body, max 2 MB>
// Response: normalized JSON
{
"format": "cii", // cii | ubl-invoice | ubl-creditnote
"profile": "urn:cen.eu:en16931:2017#compliant#...",
"data": { "from": {...}, "to": {...}, "number": "...", "items": [...] },
"reported_totals": { "grandTotal": 7339.2, "taxTotal": 1223.2, ... },
"fields": { "seller_vat_id": "FR32...", "buyer_country": "DE", ... }
}Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | missing/invalid_api_key | Key absent or unknown |
| 403 | plan_required | Endpoint needs a higher plan (e-invoicing: Pro+; parsing: Starter+) |
| 422 | invalid_request / parse_failed | Payload failed validation (message says why) |
| 429 | quota_exceeded | Monthly quota reached — upgrade |
| 500 | render_failed | Rendering error |