generate_invoice
Generate professional invoice PDFs from structured JSON data with support for multiple currencies, line items, tax rates, and UPI QR codes.
Instructions
Generate a professional invoice PDF. Accepts structured invoice data (from/to parties, line items, optional GST/tax). Returns base64-encoded PDF. Supports INR/USD/EUR/GBP currencies. Currency symbols (₹ $ € £) are guaranteed not to break away from adjacent numbers across line wraps. gst_rate on items creates a tax column — use it for any tax system (GST, VAT, sales tax). Per-item gst_rate is summed as IGST in the totals; CGST/SGST inter-vs-intra-state routing is not currently supported.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | Issuing party (your company) | |
| to | Yes | Billing party (client) | |
| invoice_number | No | Invoice identifier e.g. INV-2026-001 | |
| date | No | Invoice date ISO format YYYY-MM-DD. Defaults to today. | |
| due_date | No | Payment due date ISO format. | |
| currency | No | Currency. Default: INR | |
| items | Yes | Line items | |
| notes | No | Additional notes or payment terms. | |
| upi_qr_data | No | UPI payment string for QR code, e.g. "upi://pay?pa=merchant@upi&pn=Name&am=1000". When provided, a scannable QR code is embedded in the PDF. | |
| filename | No | Suggested filename without .pdf extension. |