---
source: https://carbone.io/examples/s-invoice/
title: "Invoice Generation Software: Branded PDF from Word | Carbone"
description: "Generate branded PDF invoices from JSON billing data with the Carbone API: a DOCX template lists the services, formats amounts and dates, adds payment details."
generated_at: "2026-11-17"
---

# Branded service invoice

Billed work, totals and payment details in your agency's style

[![Branded service invoice: PDF generated from a DOCX template and JSON data](/examples/s-invoice/thumb-result.webp)](/examples/s-invoice/result.pdf "Download the generated document")

[Download template](/examples/s-invoice/template.docx)

[Sample data](/examples/s-invoice/data.json)

[Download the generated PDF](/examples/s-invoice/result.pdf)

- **Template:** DOCX
- **Export as:** PDF, DOCX, ODT, HTML, PNG [+25 more](/documentation/developer/http-api/generate-reports.md#output-file-type)
- **Carbone:** 5.18+

Features

-   [Loop](/documentation/design/repetitions/with-arrays.md)
-   [Currency](/documentation/design/formatters/currency.md)
-   [Date](/documentation/design/formatters/date.md)

## Generate branded invoices from your billing system

Agencies, consultancies and service companies send their billing data to the Carbone API and get back invoices in their own branding.

Here, a London creative studio bills a client for a month of campaign work: the DOCX template lists the services with their VAT rate, then shows the totals, the amount due and the bank transfer details. It follows the structure of a UK VAT invoice described in [HMRC VAT Notice 700](https://www.gov.uk/guidance/vat-guide-notice-700).

In this example, you will:

-   Format dates, amounts and text
-   List the services in a table that repeats its header on each page
-   Display the totals and the payment details

## How to build a branded invoice template

Follow these steps to create your invoice template:

### 1\. Display the Company, Client and Project Details

-   Display the company, client and project information with [Carbone tags](/documentation/design/substitutions/the-basics.md). Examples: `{d.company.vatNumber}` or `{d.customer.name}`
-   Format the dates with [:formatD](/documentation/design/formatters/date.md#formatd-patternout-patternin). Examples: `{d.invoice.dueDate:formatD('D MMMM YYYY')}` or `{d.project.periodEnd:formatD('D MMM YYYY')}`

### 2\. Create the Services Table

-   Insert a table and write the column titles in the first row.
-   In the second row, display the services in a [loop](/documentation/design/repetitions/with-arrays.md#simple-array): `{d.items[i].title}`, and `{d.items[i+1].title}` in the third row.
-   Format the amounts with [:formatC](/documentation/design/formatters/currency.md#formatc-precisionorformat-targetcurrencyoroptions) and show the VAT rate of each line.  
    Examples: `{d.items[i].rate:formatC}` or `{d.items[i].vatRate}%`
-   In the table properties, set the first row as a **repeating header row** and uncheck **Allow row to break across pages**.

### 3\. Add the Totals and Payment Details

-   Below the loop rows, add the subtotal, VAT and total rows to the same table, so the amounts share one right edge.  
    Example: `VAT at {d.totals.taxRate}%` `{d.totals.tax:formatC}`
-   Insert a second table for the payment details: amount due, due date and bank transfer details.  
    Example: `{d.bank.iban}`
-   Put the company registration details in the page footer.  
    Example: `{d.company.registrationNumber}`

_Tip: `:formatD` and `:formatC` follow the options of the render request: [`lang`](/documentation/developer/http-api/generate-reports.md#multi-language) sets the date and number format, and [`currencySource` / `currencyTarget`](/documentation/developer/http-api/generate-reports.md#multi-currency) set the currency (here `en-gb` and `GBP`)._

Save the DOCX template, connect it to your JSON data, and let Carbone generate your **invoice** automatically.

## Related Examples

Check out these similar templates to learn more:

- [Multi-page product invoice](/examples/invoice-simple/index.md): DOCX template to PDF.
- [Utility invoice with payment slip](/examples/invoice-expert/index.md): DOCX template to PDF.
- [Solar quote with datasheets](/examples/quote-with-datasheet/index.md): DOCX template to PDF.

## Related topics

- [Utility invoice with payment slip](/examples/invoice-expert/index.md)
- [Bank statement with page subtotals](/examples/bank-statement-simple/index.md)
- [Checking account statement](/examples/bank-statement-expert/index.md)
- [Solar quote with datasheets](/examples/quote-with-datasheet/index.md)
- [Monthly treasury FX report](/examples/financial-report/index.md)
- [Bank reconciliation report](/examples/bank-reconciliation-report/index.md)
