Invoice Generator Input avatar

Invoice Generator Input

Under maintenance

Pricing

$10.00/month + usage

Go to Apify Store
Invoice Generator Input

Invoice Generator Input

Under maintenance

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

Jamshaid Arif

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

3 days ago

Last modified

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

FieldTypeRequiredDescription
invoiceNumberstringโŒ NoUnique invoice ID (default: INV-001)
issueDatestringโŒ NoFormat: YYYY-MM-DD (defaults to today)
dueDatestringโŒ NoFormat: YYYY-MM-DD (defaults to +30 days)
fromNamestringโœ… YesSender name or company
fromAddressstringโŒ NoSender address
fromEmailstringโŒ NoSender email
toNamestringโœ… YesRecipient name or company
toAddressstringโŒ NoRecipient address
toEmailstringโŒ NoRecipient email
itemsarrayโœ… YesList of invoice items
taxRatenumberโŒ NoTax percentage (0โ€“100)
discountPercentnumberโŒ NoDiscount percentage (0โ€“100)
currencystringโŒ NoCurrency symbol (default: $)
notesstringโŒ NoNotes or payment terms
generateHTMLbooleanโŒ NoGenerate 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

  1. Subtotal
subtotal = sum(quantity ร— unitPrice)
  1. Discount
discount = subtotal ร— (discountPercent / 100)
  1. Tax
tax = (subtotal - discount) ร— (taxRate / 100)
  1. 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