Proforma invoice PDF generator API
A proforma invoice with itemized pricing, validity and payment terms, sent before the final invoice is raised.
Just need one? Fill it in and download it freeA proforma invoice tells a buyer what a sale will cost before it is completed. Buyers use it to approve a purchase, arrange a deposit or prepare shipping paperwork, while the final invoice follows once the goods or services are delivered.
This template covers itemized pricing, tax, shipping, a validity date and payment terms, and states clearly that it is not a tax invoice. Create one from an accepted quote or a draft order with a single API call.
Generate a Proforma Invoice PDF via the API
POST your data to /api/v1/generate and get a PDF back. Copy-paste an example, swap in your API key, and loop over a list to render thousands — one proforma invoice per record.
curl -X POST https://pdfgen.com/api/v1/generate \-H "Authorization: Bearer pdfg_live_xxx" \-H "Content-Type: application/json" \-d '{"data": {"seller": {"name": "Pacific Supply Co.","address": "500 Cannery Row\nMonterey, CA 93940"},"buyer": {"name": "Northwind Studio","address": "120 Market St\nSan Francisco, CA 94103"},"proformaNumber": "PF-2026-112","issuedDate": "2026-06-10","validUntil": "2026-07-10","currency": "USD","items": [{"description": "Standing desk (electric)","quantity": 4,"unitPrice": 480,"amount": 1920},{"description": "Ergonomic chair","quantity": 4,"unitPrice": 260,"amount": 1040}],"subtotal": 2960,"taxRate": 8.5,"tax": 251.6,"shipping": 120,"total": 3331.6,"paymentTerms": "50% deposit on order, balance before dispatch."},"format": "A4","engine": "handlebars","html": "<div style=\"max-width:760px;margin:0 auto;padding:48px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;color:#111827;\">\n <div style=\"display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:36px;\">\n <div>\n {{#if logo}}<img src=\"{{logo}}\" alt=\"\" style=\"display:block;max-width:200px;max-height:56px;margin:0 0 10px;\">{{/if}}\n <h1 style=\"font-size:22px;font-weight:800;margin:0;\">{{seller.name}}</h1>\n <p style=\"color:#6b7280;margin:6px 0 0;font-size:13px;white-space:pre-line;\">{{seller.address}}</p>\n </div>\n <div style=\"text-align:right;\">\n <h2 style=\"font-size:24px;letter-spacing:2px;color:#4338ca;margin:0;font-weight:800;\">PROFORMA INVOICE</h2>\n <p style=\"margin:8px 0 0;color:#6b7280;font-size:13px;\">#{{proformaNumber}}</p>\n <p style=\"margin:2px 0 0;color:#6b7280;font-size:13px;\">{{formatDate issuedDate}}</p>\n </div>\n </div>\n <div style=\"display:flex;justify-content:space-between;margin-bottom:28px;\">\n <div>\n <p style=\"font-size:11px;text-transform:uppercase;letter-spacing:1.5px;color:#9ca3af;font-weight:700;margin:0 0 8px;\">Prepared for</p>\n <p style=\"margin:0;font-weight:600;\">{{buyer.name}}</p>\n <p style=\"margin:2px 0 0;color:#6b7280;font-size:13px;white-space:pre-line;\">{{buyer.address}}</p>\n </div>\n <div style=\"text-align:right;\">\n <p style=\"font-size:11px;text-transform:uppercase;letter-spacing:1.5px;color:#9ca3af;font-weight:700;margin:0 0 8px;\">Valid until</p>\n <p style=\"margin:0;font-weight:600;\">{{formatDate validUntil}}</p>\n </div>\n </div>\n <table style=\"width:100%;border-collapse:collapse;font-size:14px;line-height:inherit;\">\n <thead>\n <tr style=\"background:#eef2ff;text-align:left;\">\n <th style=\"padding:12px;border-bottom:1px solid #c7d2fe;\">Description</th>\n <th style=\"padding:12px;border-bottom:1px solid #c7d2fe;text-align:center;\">Qty</th>\n <th style=\"padding:12px;border-bottom:1px solid #c7d2fe;text-align:right;\">Unit</th>\n <th style=\"padding:12px;border-bottom:1px solid #c7d2fe;text-align:right;\">Amount</th>\n </tr>\n </thead>\n <tbody>\n {{#each items}}\n <tr>\n <td style=\"padding:12px;border-bottom:1px solid #f3f4f6;\">{{description}}</td>\n <td style=\"padding:12px;border-bottom:1px solid #f3f4f6;text-align:center;\">{{quantity}}</td>\n <td style=\"padding:12px;border-bottom:1px solid #f3f4f6;text-align:right;\">{{formatCurrency unitPrice ../currency}}</td>\n <td style=\"padding:12px;border-bottom:1px solid #f3f4f6;text-align:right;\">{{formatCurrency amount ../currency}}</td>\n </tr>\n {{/each}}\n </tbody>\n </table>\n <table style=\"font-size:14px;line-height:inherit;min-width:240px;margin:20px 0 0 auto;\">\n <tr><td style=\"padding:4px 0;color:#6b7280;\">Subtotal</td><td style=\"padding:4px 0;text-align:right;\">{{formatCurrency subtotal currency}}</td></tr>\n {{#if taxRate}}<tr><td style=\"padding:4px 0;color:#6b7280;\">Tax ({{taxRate}}%)</td><td style=\"padding:4px 0;text-align:right;\">{{formatCurrency tax currency}}</td></tr>{{/if}}\n {{#if shipping}}<tr><td style=\"padding:4px 0;color:#6b7280;\">Shipping</td><td style=\"padding:4px 0;text-align:right;\">{{formatCurrency shipping currency}}</td></tr>{{/if}}\n <tr><td style=\"padding:12px 0 0;font-weight:800;font-size:16px;\">Estimated total</td><td style=\"padding:12px 0 0;text-align:right;font-weight:800;font-size:16px;color:#4338ca;\">{{formatCurrency total currency}}</td></tr>\n </table>\n {{#if paymentTerms}}\n <p style=\"font-size:11px;text-transform:uppercase;letter-spacing:1.5px;color:#9ca3af;font-weight:700;margin:0 0 8px;margin-top:32px;\">Payment terms</p>\n <p style=\"margin:0;font-size:13px;color:#374151;white-space:pre-line;\">{{paymentTerms}}</p>\n {{/if}}\n <p style=\"margin-top:40px;font-size:12px;color:#9ca3af;border-top:1px solid #f3f4f6;padding-top:16px;\">This proforma invoice is an estimate. It is not a tax invoice or a demand for payment.</p>\n</div>"}' --output proforma-invoice.pdf
Working in another language? Follow a full guide for your stack:
What you can build
- Sending a proforma as soon as a draft order is created
- Requesting a deposit before production starts
- Giving international buyers pricing for import paperwork
- Turning an accepted quote into a proforma automatically
Frequently asked questions
- Is a proforma invoice a real invoice?
- No. It is an estimate sent before a sale is final, so it is not a tax invoice and does not create a payment obligation. Issue a normal invoice once the sale is complete.
- How is a proforma invoice different from a quote?
- A quote offers a price for a buyer to consider. A proforma usually comes later, once the buyer intends to go ahead, and it shows close to what the final invoice will say.
- Can I generate proformas in bulk?
- Yes. Save the template once, then call /api/v1/generate for each order. Each call returns a PDF, so no browser needs to be managed on your side.