Automated Invoice Mailing
This guide shows how to automatically send printed invoices via the Intelliprint hybrid mail API whenever invoices are created or become overdue. It is ideal for:- Accounting and billing platforms
- Subscription and SaaS systems
- Finance teams replacing manual invoice printing
Overview
High-level flow: You can implement automated invoice mailing using:- HTML-based letters (for simple layouts)
- PDF-based letters (for existing invoice PDFs)
- Backgrounds and templates for consistent branding
Step 1: Decide HTML vs PDF
Option A – HTML invoices- Best when your system already renders HTML.
- Use the HTML + One Recipient quickstart.
- Best when you already generate PDF invoices.
- Use the PDF to Post quickstart.
Step 2: Map Invoice Events to Postal Actions
Decide when to send printed invoices. Common patterns:-
Initial invoice generation
- Every time an invoice is created for customers with postal preferences.
-
Overdue reminders
- Send a letter if an invoice has not been paid X days after due date.
-
Final notice
- Send a tracked or recorded letter before escalation.
Step 3: Implement the API Call
Example: HTML-based invoice letter (Node.js)
testmode to false once you have tested the flow.
Example: PDF-based invoice letter (Node.js)
Step 4: Track Statuses and Build an Audit Trail
For finance and compliance, you should store:- Intelliprint
print_job_id - Letter statuses and key timestamps
- Any returned or failed mail indicators
- Retrieve print jobs and letters by ID
- Check status (e.g.
waiting_to_print,printing,sent,returned) - Cancel jobs that have not yet been printed
Step 5: Control Costs & Service Levels
Invoices can be time-sensitive and high volume. Use:-
Postage choices and scheduling
See Postage & Scheduling to choose between first class, second class, tracked services and dispatch dates. -
Double-sided printing
Enable double-sided printing for multi-page invoices to reduce sheet count and costs. See Double-Sided Printing in the HTML quickstart. -
Test mode for cost estimation
Usetestmode: truewith your real data to calculate actual per-invoice and per-campaign costs without sending live mail. See Understand Costs.

