A five-minute setup that turns any Zap trigger (a Stripe payment, a form response, a new spreadsheet row) into a branded PDF invoice, certificate or quote, ready to email or store.
POST and URL to https://pdfmintapi.com/v1/generate.Authorization = Bearer pm_your_key and Content-Type = application/json.{
"template": "invoice",
"response_format": "url",
"filename": "INV-{{invoice number}}",
"data": {
"invoice_number": "{{invoice number}}",
"date": "{{date}}",
"currency": "$",
"from": { "name": "Your Company" },
"to": { "name": "{{customer name}}", "email": "{{customer email}}" },
"items": [{ "name": "{{description}}", "qty": 1, "amount": "{{amount}}" }],
"total": "{{amount}}"
}
}
"response_format": "url" makes PDFMint return JSON with links instead of a raw file, which Zapier's later steps can use much more easily.pdf_url (a direct link to the PDF file) and view_url (a tracked link that tells you when it's opened).view_url in the email body. When your customer opens it, your PDFMint dashboard shows Opened. To attach the file instead, use pdf_url as the attachment. Attached files can't report opens, though.This is the most common Zapier error with PDF APIs. Zapier's form fields hold plain text, so nested JSON is often sent as one quoted string instead of an object. Many APIs reject that.
data or options arrives as a string containing valid JSON, it's parsed automatically. If you still see the error, the JSON inside the string is broken. The usual cause is a mapped field containing an unescaped quote mark, such as a customer named Joe "JJ" Smith. Wrap that field with Zapier's Formatter → Text → Replace to remove the quotes.Describe the document you want in one sentence, such as "a certificate with a gold border and a seal", and Magic Templates builds a reusable template in about a minute. Then use "template": "custom:your-name" in step 4. You never touch HTML.
| Built-in template | Good for |
|---|---|
invoice | Payments, retainers, client billing |
receipt | Order confirmations, donations |
certificate | Course completions, event attendance |
report | Weekly KPIs, client reports |
packing-slip | E-commerce fulfilment |
Sample data for every template: /v1/templates. Full field reference: API docs.
Free tier: 100 PDFs a month, tracking included, no credit card.
Get your free API key →