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

# View the usage of a discount code

## Viewing Standard Discount Code Usage

1. In the **Discount Code List**, locate the discount code you want to review.

2. Navigate to the right-hand side of the code and click the **View Usage Detail** button. A detailed report will be displayed, including:

   * Who Used This Code: The users who applied the discount code.
   * When the Code Was Used: The date and time of usage.
   * Related Subscription: The subscription linked to the code usage.
   * Related Invoice: The invoice associated with the discount code.
   * Related Transaction: The transaction details tied to the code usage.

3. To search for a specific user, click the **Reading Glass** icon in the **Used By** column. This allows you to find users who applied the discount code.

4. Use the **Used At** column to sort and filter usage data by date and time.

5. To export the code usage details:
   * Click the **Export** button located at the top-right corner of the code usage list.
   * The details will be downloaded as a spreadsheet.
   * Navigate to the **Tasks** list bar to access and manage the exported spreadsheet.

This feature ensures you have comprehensive insights into the application and impact of your discount codes.

***

## Viewing Batch Discount Code Usage

Batch discount codes provide enhanced tracking capabilities for individual codes within a batch template.

### Viewing Batch Template Usage Statistics

1. In the **Discount Code List**, locate the batch template you want to review (identified by the batch icon or label).

2. Open the template detail page to view overall statistics:
   * **Total Quantity**: Target number of codes in the batch
   * **Generated Count**: Number of codes created
   * **Used Count**: Number of codes redeemed
   * **Available Count**: Number of unused codes
   * **Usage Rate**: Percentage of codes used

### Viewing Individual Code Usage

1. Open a batch template detail page.

2. Navigate to the **Codes** tab to view all codes in the batch.

3. For each code, you can see:
   * **Code**: The actual discount code
   * **Status**: Available (not used) or Redeemed (used)
   * **Used By**: Email address of the user who redeemed the code (if used)
   * **Used At**: Date and time when the code was redeemed (if used)
   * **Created At**: When the code was generated

### Filtering and Searching Code Usage

1. **Filter by Status**:
   * Select **Available** to see all unused codes
   * Select **Redeemed** to see all used codes

2. **Search for Specific Codes**:
   * Use the search box to find codes by partial match
   * Useful when you need to verify if a specific code was used

3. **Filter by Usage Date**:
   * Use date range filters to see codes used within specific time periods
   * Helps analyze campaign performance over time

### Viewing Individual Code Details

1. Click on any code in the list to view detailed information:
   * **Code Information**: The discount code and parent template
   * **Current Status**: Available or Redeemed
   * **Usage Information** (if redeemed):
     * User email address
     * Redemption date and time
     * Related invoice ID
     * Related subscription ID
     * Related payment ID
   * **Discount Rules**: Rules inherited from the template
   * **Code Creation**: When the code was generated

### Tracking Usage Trends

The batch template detail page provides insights into:

* **Daily Usage**: Track how many codes are redeemed each day
* **Campaign Performance**: Monitor the redemption rate over time
* **User Distribution**: See which codes are most popular
* **Revenue Impact**: Analyze the financial impact of the batch campaign

### Exporting Batch Code Usage

1. On the batch template codes list page, apply filters as needed (e.g., only redeemed codes).

2. Click the **Export** button.

3. Select export format (Excel or CSV).

4. The export includes comprehensive usage data:
   * All code information
   * Usage status for each code
   * User details for redeemed codes
   * Usage timestamps
   * Related transaction information
   * Template information
   * Discount rule details

5. Download the file from the **Tasks** section when processing is complete.

This allows you to perform detailed analysis of your batch discount code campaigns, track individual code performance, and understand customer redemption patterns.
