InvoiceFoundry
Pricing
$50.00 / 1,000 results
InvoiceFoundry
InvoiceFoundry turns your client, line item, and branding details into polished PDF invoices in seconds. It automates taxes and currencies, embeds QR codes for instant payment, and streams structured data to your CRM or BI tools so every invoice stays consistent and audit ready.
Pricing
$50.00 / 1,000 results
Rating
0.0
(0)
Developer

Krffl LLC
Actor stats
0
Bookmarked
3
Total users
2
Monthly active users
5 days ago
Last modified
Categories
Share
Invoice Generator Actor
Create polished invoices in bulk without touching a spreadsheet. This Actor turns structured input (JSON, spreadsheet exports, API payloads) into production-ready documents in minutes. It handles numbering, due dates, tax calculations, branding, and exports the output in multiple formats so you can plug the result straight into your workflow.
Why use this Actor?
- Batch-friendly: Generate a single invoice or thousands in one run.
- Consistent branding: Configure colours, fonts, logos, layouts, watermarks, and optional QR codes.
- Streamlined layout: Two-column header (seller + logo), invoice details table with highlighted amount due, banded item grid, side-by-side totals & notes, and a footer QR/payment call-to-action.
- US Letter ready: Optimised for 8.5"×11" output so invoices print cleanly without tweaking margins.
- Accurate calculations: Supports percentage/fixed discounts, multiple tax rates, auto-numbering schemes, and due-date rules.
- Multi-format output: Produce PDF, HTML, and JSON representations, plus an aggregated ZIP archive for batch downloads.
- Actionable analytics: Receive a summary report with totals, averages, currency breakdowns, and failure counts.
- Status tracking timeline: Capture lifecycle updates (draft → paid) and persist them in the dataset for downstream automation or reporting.
How it works
- Provide an array of invoices in the input JSON (supports copy-paste from CSV/Excel after conversion).
- Optionally customise numbering, templates, QR code behaviour, and output formats.
- The Actor validates each invoice, calculates totals, and generates the formats you enabled.
- Results are stored in the default key-value store and metadata is written to the dataset for downstream automation.
Input
The full input schema lives in .actor/input_schema.json. Key fields are:
| Field | Type | Required | Description |
|---|---|---|---|
action | String | ✅ | GENERATE (default) renders invoices. UPDATE_STATUS applies lifecycle updates you provide. PROCESS_PASTDUE auto-marks unpaid invoices past their due date as overdue. UPSERT_DEFAULTS stores shared seller/template defaults for future runs. |
invoices | Array | Conditional | One or more invoice objects (seller, buyer, items, optional discounts, notes, terms, lifecycle status, customFields). Required when action = GENERATE. |
statusUpdates | Array | Conditional | Batch of { invoiceNumber, status, amountPaid?, note?, paymentReference?, updatedAt? } entries. amountPaid accepts a numeric value or numeric string. Required when action is UPDATE_STATUS. |
numberingScheme | String | ❌ | Pattern for automatic invoice numbering (INV-{YYYY}-{MM}-{####}, {CLIENT}-{DATE}-{SEQ}, etc.). |
allowDuplicates | Boolean | ❌ | Skip duplicate-number check when true (default false). |
output | Object | ❌ | Toggles for generated formats (pdf, html, json). Defaults to PDF only. |
template | Object | ❌ | Branding options: layout, colours, font family, logo URL placeholder, and QR code configuration (content, caption, payment link). |
Each invoice entry supports:
invoiceNumber,issueDate,dueDate,currencyseller/buyerobjects with address & contact infoitems: array of{ description, quantity, unitPrice, taxRate }discount:{ type: 'percentage' | 'fixed', value }notes,terms,status(draft,sent,viewed,partial_payment,paid,overdue,cancelled)customFields: key/value pairs rendered in the PDF & HTML outputs
Logo sizing tip: the header positions the brand mark inside a 240×60 pt area (≈3.3″ × 0.8″). Supply a transparent PNG or SVG that’s no wider than ~600 px and ~200 px tall so it stays sharp when centered and scaled down.
Persisting defaults
Use action: "UPSERT_DEFAULTS" once to store company details, template colours, and other reusable settings:
{"action": "UPSERT_DEFAULTS","defaults": {"seller": {"name": "Acme Agency","address": "100 Main St","city": "Metropolis"},"template": {"primaryColor": "#123456","logoUrl": "https://example.com/logo.png"}}}
The actor saves these values in its default key-value store and merges them into every subsequent run. After seeding defaults you can omit the repeated fields—just provide the invoice payload (or status updates).
Example input
{"invoices": [{"invoiceNumber": "INV-2025-001","issueDate": "2025-01-15","terms": "Net 30","currency": "USD","seller": {"name": "Example Agency","address": "123 Business St","city": "New York","state": "NY","zipCode": "10001","country": "USA","email": "billing@example.com"},"buyer": {"name": "Client Company","address": "456 Client Ave","city": "Los Angeles","state": "CA","zipCode": "90001","country": "USA"},"items": [{ "description": "Web Development", "quantity": 40, "unitPrice": 150, "taxRate": 0.1 },{ "description": "Consulting", "quantity": 10, "unitPrice": 200, "taxRate": 0.1 }],"discount": { "type": "percentage", "value": 5 },"notes": "Thank you for partnering with us this quarter. Please reference the PO on remittance.","status": "SENT","customFields": {"PO Number": "PO-12345","Project Code": "PROJ-001"}}],"numberingScheme": "INV-{YYYY}-{MM}-{####}","output": {"pdf": true,"html": true,"json": true},"template": {"primaryColor": "#2563eb","secondaryColor": "#64748b","fontFamily": "Helvetica","qrCode": {"enabled": true,"content": "invoiceUrl","caption": "Scan to view this invoice online","paymentLink": "https://pay.example.com/invoice/INV-2025-001"}}}
Status update workflow
- Switch
actiontoUPDATE_STATUSto skip rendering and apply lifecycle changes only. - Provide one or more entries in
statusUpdates. Each event is persisted in the default key-value store and appended to the dataset timeline so downstream automations can react. - The dataset exposes a
statusTimelineview that unwinds history so finance teams can filter bypaid,overdue, reminder count, or the timestamp of the most recent status change.
Example payload:
{"action": "UPDATE_STATUS","statusUpdates": [{"invoiceNumber": "INV-2025-001","status": "paid","amountPaid": 1875.50,"paymentReference": "txn-872345","note": "Paid via ACH","updatedAt": "2025-02-12T14:05:00.000Z"}]}
Integrating with other actors
- Every run writes invoice metadata and lifecycle events to the default dataset (
RUN.defaultDatasetId). Each item contains the currentstatus,lifecycleStatus, payment balances, and fullstatusHistory. - Create a dedicated notification actor (for Slack, email, accounting systems, etc.) that reads the dataset items for a run via the Apify API. You can trigger it with an Actor webhook on
RUN.SUCCEEDED, schedule, or manualapify.call. - Store any hand-off state (for example, the last processed dataset item ID) in the notification actor’s key-value store so it can retry failed deliveries without re-running invoice generation.
- This separation keeps the invoice generator deterministic while giving integrators freedom to shape payloads per destination.
Local testing helpers
- Sample payloads live in
test_configs/:GENERATE.json– seeds invoices and documents.UPDATE_STATUS.json– applies two lifecycle updates to existing invoices.PROCESS_PASTDUE.json– runs the overdue marker logic.UPSERT_DEFAULTS.json– stores reusable seller/template defaults.STATUS_INDEX_SEED.json– seed data forinvoice-status-indexwhen you need state without re-runningGENERATE.
- Copy a file into
storage/key_value_stores/default/INPUT.json(or pointAPIFY_INPUT_FILEat it) beforeapify run. - To keep prior dataset/key-value store state between runs, add
--no-purge(or exportAPIFY_PURGE_LOCAL_STORAGE=0) when running locally. - When testing
PROCESS_PASTDUE, copySTATUS_INDEX_SEED.jsontostorage/key_value_stores/default/invoice-status-index.jsonbefore executing so the action has invoices to evaluate.
Output
| Location | Contents |
|---|---|
Default dataset (RUN.defaultDatasetId) | One record per invoice/event. Success rows include amounts, URLs for each generated format, lifecycle status, payment balances, reminder metadata, and full status history. Failures store the error message. |
Default key-value store (RUN.defaultKeyValueStoreId) | Generated files: invoice-<number>.pdf, .html, .json (depending on formats), invoices-batch.zip, invoice-summary.json, invoice-summary.txt. |
| Output schema shortcuts | overview (dataset view), statusTimeline (flattened lifecycle view), invoices (key prefix listing), zipArchive, and summary links surfaced in Apify Console. |
Summary analytics
invoice-summary.json contains totals, averages, per-currency breakdown, and failure counts. invoice-summary.txt provides a human-readable report.
Typical use cases
- Freelancers and agencies automating recurring invoicing
- Marketplaces generating payout statements for vendors
- Back-office teams producing PDF invoices from ERP/CRM exports
- AI agents that need reliable document output from structured data
Running on Apify
- Open the Actor in Apify Console and review the input JSON form (auto-generated from
input_schema.json). - Paste or upload your invoice data; tweak optional parameters.
- Click Run. Monitor progress via the log and dataset preview.
- Download generated documents from the Key-value stores tab or use the direct links exposed in the Output tab.
- Optionally schedule recurring runs or trigger the Actor via API/Webhook. A ZIP archive (
invoices-batch.zip) and analytics summaries (invoice-summary.json,.txt) are stored automatically when you generate PDF output for multiple invoices.
Scheduling recurring runs
- In Apify Console, create a task for this actor (Actors → Tasks → Create task). The form exposes structured sections for defaults so you can fill them without editing raw JSON.
- Go to Actors → Schedules → Create schedule, select the task, choose the cadence (cron expression, hourly, daily, weekly, etc.), and limit concurrent runs if needed.
- Seed or update shared settings by running the task once with
action: "UPSERT_DEFAULTS"; reuse the same task withaction: "GENERATE"or status workflows afterwards.
Example hourly payment sync (set schedule cron to 0 * * * *):
{"action": "UPDATE_STATUS","statusUpdates": [{"invoiceNumber": "INV-2025-001","status": "paid","amountPaid": 1250.0,"paymentReference": "txn-5678"}]}
Example daily past-due sweep (set schedule cron to 0 7 * * * for 7:00 every morning):
{"action": "PROCESS_PASTDUE",}
Development & deployment
npm install # install dependenciesapify run # run locally with INPUT.jsonapify login # authenticate with Apifyapify push # deploy new version to the platformnpm test # run unit/integration tests
For detailed architecture notes and full field descriptions see:
- ./SPECIFICATION.md
- ./ACTOR_DEVELOPMENT_GUIDE.md
- ./AGENTS.md
Refer to
storage/key_value_stores/default/INPUT.jsonfor an annotated example that demonstrates colour theming, logo embedding, QR codes, and output format toggles.
Support & feedback
- Bug reports / feature requests: open an issue in this repository or contact via Apify support.
- Contributions: feel free to submit pull requests for new templates, integrations, or localisation improvements.
License
ISC