Invoice Generator Input
Pricing
$10.00/month + usage
Go to Apify Store
Under maintenance
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
$10.00/month + usage
Rating
0.0
(0)
Developer
Jamshaid Arif
Maintained by Community
Actor stats
0
Bookmarked
1
Total users
0
Monthly active users
3 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