Invoice Generator Input
Pricing
from $10.00 / 1,000 results
Go to Apify Store

Invoice Generator Input
A flexible and developer-friendly tool to generate professional invoices from structured input data. Supports line items, tax, discounts, and optional HTML output.
Pricing
from $10.00 / 1,000 results
Rating
0.0
(0)
Developer
Jamshaid Arif
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
2
Monthly active users
25 days ago
Last modified
Categories
Share
🧾 Invoice Generator
A flexible and developer-friendly tool to generate professional invoices from structured input data. Supports line items, tax, discounts, and optional HTML output.
🚀 Features
- 🧩 Structured invoice generation from JSON input
- 📦 Supports multiple line items with quantity and pricing
- 💰 Automatic subtotal, tax, discount, and total calculation
- 🌐 Optional HTML invoice generation
- 🛡️ Strong input validation with strict schema
- 🔌 Easy integration into APIs, automation tools, and workflows
📥 Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
invoiceNumber | string | ❌ No | Unique invoice ID (default: INV-001) |
issueDate | string | ❌ No | Format: YYYY-MM-DD (defaults to today) |
dueDate | string | ❌ No | Format: YYYY-MM-DD (defaults to +30 days) |
fromName | string | ✅ Yes | Sender name or company |
fromAddress | string | ❌ No | Sender address |
fromEmail | string | ❌ No | Sender email |
toName | string | ✅ Yes | Recipient name or company |
toAddress | string | ❌ No | Recipient address |
toEmail | string | ❌ No | Recipient email |
items | array | ✅ Yes | List of invoice items |
taxRate | number | ❌ No | Tax percentage (0–100) |
discountPercent | number | ❌ No | Discount percentage (0–100) |
currency | string | ❌ No | Currency symbol (default: $) |
notes | string | ❌ No | Notes or payment terms |
generateHTML | boolean | ❌ No | Generate HTML invoice (default: true) |
📦 Line Item Format
Each item in the items array must follow:
{"description": "Web development service","quantity": 2,"unitPrice": 150}
⚙️ How It Works
💵 Calculations
- Subtotal
subtotal = sum(quantity × unitPrice)
- Discount
discount = subtotal × (discountPercent / 100)
- Tax
tax = (subtotal - discount) × (taxRate / 100)
- Total
total = subtotal - discount + tax
🧮 Example
Input
{"fromName": "Umar Tech","toName": "Client Inc.","items": [{ "description": "API Development", "quantity": 1, "unitPrice": 500 },{ "description": "Hosting", "quantity": 2, "unitPrice": 50 }],"taxRate": 10,"discountPercent": 5}
Output
{"subtotal": 600,"discount": 30,"tax": 57,"total": 627}
🏗️ Use Cases
- Freelancers generating invoices
- SaaS billing systems
- Automation pipelines (Apify, scripts, etc.)
- Backend invoice services
- Client billing dashboards
🌐 HTML Output
If generateHTML is enabled, the tool returns a ready-to-use invoice template that can be:
- Rendered in a browser
- Converted to PDF
- Sent via email
⚡ Notes
- If dates are not provided, defaults are automatically applied
- At least one item is required in the invoice
- Discounts are applied before tax calculation
- Currency symbol is customizable
🛠️ Example Logic (Pseudo Code)
subtotal = sum(item["quantity"] * item["unitPrice"] for item in items)discount = subtotal * (discountPercent / 100)tax = (subtotal - discount) * (taxRate / 100)total = subtotal - discount + tax
📄 License
MIT License