Invoice Template

Generate this PDF document with a simple API request or via Zapier

Invoice

Example JSON

Below is the JSON used to create the invoice above. All the attributes within the data parameter are non-mandatory. Supply only what you want to populate on the document.

    
        {
    "template": "invoice5",
    "data": {
        "logo": "https://docamatic.s3.eu-west-1.amazonaws.com/assets/logo.png",
        "title": "Invoice",
        "invoice_number_label": "Invoice No",
        "invoice_number": "71490",
        "date_label": "Date",
        "date": "Feb 29, 2024",
        "from_label": "From",
        "from1": "Acme",
        "from2": "pay@acme.comm",
        "from3": null,
        "from4": null,
        "from5": null,
        "to_label": "To",
        "to1": "Rilo",
        "to2": "accounts@rilo.com",
        "to3": null,
        "to4": null,
        "to5": null,
        "breakdown_label": "Breakdown",
        "total_label": "Total",
        "items": [
            {
                "name": "API Integration",
                "description": "Connects up to 5 external services",
                "price": "$3000"
            },
            {
                "name": "E-commerce Setup",
                "description": "Includes product listings and payment gateway",
                "price": "$3800"
            },
            {
                "name": "Security Audit",
                "description": "Ensures your website is free from vulnerabilities",
                "price": "$1650"
            }
        ],
        "total": "$8450",
        "currency": "USD",
        "button1_text": "Pay with PayPal",
        "button1_url": "https://paypal.com",
        "button1_svg": "https://docamatic.s3.eu-west-1.amazonaws.com/assets/paypal.svg",
        "button2_text": "Pay with Stripe",
        "button2_url": "https://stripe.com",
        "button2_svg": "https://docamatic.s3.eu-west-1.amazonaws.com/assets/stripe.svg",
        "message": "Bank details can be sent upon request. Payment due within 30 days.",
        "header_rule_color": "#000000",
        "accent_color": "#000000"
    }
}
    

Styling

It's easy to change the look and feel of the invoice. The template API allows you to easily insert your own logo and specify a custom font.

    
        {
    "template": "invoice5",
    "font": "Open Sans",
    "font_size": 0.9,
    "font_color": "#32325d",
    "data" : {...}
}
    

Generate as PDF or Image

By default all templates are generated as a PDF document. If you would like to generate as a PNG or WEBP image, supply the file_type parameter in your API request:

    
        {
    "template": "invoice5",
    "file_type": "png",
    "data" : {...}
}
    

Auto Generate Invoices with Zapier

Not a developer? No problem! Docamatic's Zapier integration allows you to easily generate invoices without coding.

Zapier and Docamatic

Need a custom template?

If you prefer to build your own templates or require more flexibility, be sure to try our HTML to PDF API . We are using the same HTML to PDF API to generate the invoice above!

Back to templates