# Sawant Sites — Invoice Creator (invoice.sawantsites.com) > Free, stateless invoice / quote / receipt generator. No login, no server, no > storage: the entire tool runs in the browser page. This file teaches > browser-driving AI agents how to create a finished PDF for their user. There is no REST API. You interact through the web page itself, either by the fast path (a prefill URL — recommended) or by filling the form manually. ## Fast path (recommended): prefill URL 1. Build the invoice as a JSON object (schema below). All fields are optional; sensible defaults are filled in. Include at least `items`, `from.name`, `to.name`. 2. Encode it: `base64url(JSON.stringify(data))` — standard base64 with `+`→`-`, `/`→`_`, padding optional. UTF-8. No compression. 3. Open: `https://invoice.sawantsites.com/?d=` 4. The form hydrates with your data (the URL cleans itself to `/`). Verify the live preview looks right. 5. Click the button `[data-agent="download-pdf"]` (visible text "Download PDF"). The browser downloads `.pdf`. A malformed `?d=` value is ignored silently and the page loads normally — if the form shows defaults instead of your data, re-check your base64url. ### JSON schema (all fields optional unless noted) ```jsonc { "docType": "invoice", // "invoice" | "quote" | "receipt" "invoiceNumber": "INV-001", "issueDate": "2026-07-02", // YYYY-MM-DD "dueDate": "2026-07-16", // YYYY-MM-DD (quotes: valid-until; receipts: unused) "currency": "USD", // USD EUR GBP INR CAD AUD JPY CNY AED SGD CHF "from": { // you / the sender "name": "", "email": "", "address": "", "phone": "", "taxIdLabel": "", "taxId": "" // e.g. "GSTIN" / "VAT No." / "EIN" }, "to": { /* same shape as "from" — the client being billed */ }, "items": [ // strongly recommended; ≥1 entry { "description": "Design work", "quantity": 10, "rate": 120 } ], "taxLabel": "Tax", // display label, e.g. "GST", "VAT" "taxPercent": 0, // 0–100 "discountType": "percent", // "percent" | "fixed" "discountValue": 0, "payment": { "link": "", // Stripe/PayPal/any payment URL "upiId": "", // UPI ID — renders a scan-to-pay QR code "bankName": "", "accountName": "", "accountNumber": "", "bankCode": "" }, "notes": "", "terms": "", "theme": { "template": "classic", // "classic" | "modern" | "minimal" "accent": "#F0A000", // hex color "font": "sans" // "sans" | "serif" | "mono" } } ``` `logoDataUrl` is not accepted via URL (logos must be uploaded by a human). Totals (subtotal, discount, tax, total) are computed automatically from items. ### Worked example JSON: `{"invoiceNumber":"INV-042","from":{"name":"Acme Co"},"to":{"name":"Globex"},"items":[{"description":"Consulting","quantity":2,"rate":500}],"taxPercent":10}` URL: `https://invoice.sawantsites.com/?d=eyJpbnZvaWNlTnVtYmVyIjoiSU5WLTA0MiIsImZyb20iOnsibmFtZSI6IkFjbWUgQ28ifSwidG8iOnsibmFtZSI6Ikdsb2JleCJ9LCJpdGVtcyI6W3siZGVzY3JpcHRpb24iOiJDb25zdWx0aW5nIiwicXVhbnRpdHkiOjIsInJhdGUiOjUwMH1dLCJ0YXhQZXJjZW50IjoxMH0` Result: form shows Acme Co → Globex, 2 × 500.00 Consulting, 10% tax, total USD 1,100.00. Click Download PDF. ## Manual path: driving the form Every control has a stable `data-agent` attribute that mirrors the JSON paths above, plus a unique accessible name (aria-label) if you navigate by accessibility tree. - Document type: buttons `[data-agent="docType.invoice"]`, `docType.quote`, `docType.receipt` - Header fields: `invoiceNumber`, `currency` (a