> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firmhouse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Discount code usage report

> Generate a discount code usage report in Firmhouse showing revenue per discount code and currency, useful for evaluating promo and campaign performance.

The **discount code usage** report shows how much revenue each discount code generated, grouped by code and currency.

> This report is currently in **beta**. It is not enabled by default. Contact Firmhouse support to enable it for your account.

## Date filters

* **Invoice date from (start of day)** - Include invoices from this date onward. Defaults to one month ago.
* **Invoice date to (end of day)** - Include invoices up to this date. Defaults to today.

## What is included

* Finalized invoices inside the selected date range
* Only invoices dated on or after the date the discount code was applied
* Subscriptions with completed signup
* Regular invoices only (credit invoices are excluded)

## Available fields

* **discount\_code\_id** - Internal ID of the discount code
* **discount\_code** - Discount code text (for example, `WELKOM10`)
* **promotion\_id** - Internal ID of the linked promotion
* **promotion\_name** - Name of the linked promotion
* **currency** - Invoice currency
* **subscription\_count** - Number of unique subscriptions that used the code
* **redemption\_count** - Number of unique invoices where the code was used
* **total\_revenue\_excluding\_tax\_cents** - Net revenue excluding tax
* **total\_revenue\_including\_tax\_cents** - Net revenue including tax
* **product\_revenue\_excluding\_tax\_cents** - Product/subscription revenue excluding tax (before discount)
* **product\_revenue\_including\_tax\_cents** - Product/subscription revenue including tax (before discount)
* **shipping\_revenue\_excluding\_tax\_cents** - Shipping revenue excluding tax
* **shipping\_revenue\_including\_tax\_cents** - Shipping revenue including tax
* **discount\_amount\_including\_tax\_cents** - Total discount amount including tax

## How totals are calculated

* `total_revenue_including_tax_cents = product_revenue_including_tax_cents + shipping_revenue_including_tax_cents - discount_amount_including_tax_cents`

Discount amounts are shown as positive numbers in this report.

## FAQ

### Why do I see duplicate CSV headers like "Discount code"?

This is expected in some exports:

* The first **Discount code** column is `discount_code_id`
* The second **Discount code** column is `discount_code`
* **Promotion** is `promotion_id`
* **Promotion name** is `promotion_name`

### Is product revenue already discounted?

No. `product_revenue_*` is before discount. Discounts are listed separately in `discount_amount_*`, and the discount is subtracted in `total_revenue_*`.
