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

# Coupons & Discounts

> Create and manage coupons and discounts.

With coupons and discounts, you can offer your customers discounts both in the [Checkout](/guide/checkout/introduction) and during [subscription creation](/guide/subscriptions/introduction).
You can create coupons and discounts for all products or only for specific products. You can also specify whether a coupon can only be used once or multiple times.

## Discounts

There are two types of discounts you can create:

1. **Percentage Discount**: A percentage discount is applied to the total amount.
2. **Fixed Amount**: A fixed amount is deducted from the unit price.

<Warning>
  When using **Fixed Amount**, the discount is applied to the unit price, not the total price.
  Example: A product costs 10 EUR / unit and the discount is 5 EUR. The customer only pays 5 EUR / unit.
</Warning>

### Create Discount

<Tabs>
  <Tab title="Use Web App">
    <Steps>
      <Step title="Open the Create Form">
        Select **Discounts** from the main menu to display the list of discounts. Click **New**.
      </Step>

      <Step title="Configure Discount">
        Fill in the fields:

        * **Name**: The name of the discount. This is displayed to the customer in the [Checkout](/guide/checkout/introduction).
        * **Code**: The code that the customer must enter in the [Checkout](/guide/checkout/introduction) to receive the discount.
        * **Type**: The type of discount. Choose between a percentage discount and a fixed amount.
        * **Percentage Discount**: The percentage discount applied to the total amount.
        * **Fixed Amount**: The fixed amount deducted from the total amount.
        * **Active**: Whether the discount is active or not.

        <Tip>
          By default, a discount is permanently valid and can be used any number of times in the cart.
        </Tip>

        <Frame>
          <img src="https://mintcdn.com/fynnsubscriptionbilling/tzBoVhlU_naKbmRt/images/discount-create-modal.png?fit=max&auto=format&n=tzBoVhlU_naKbmRt&q=85&s=563014ef34ad30d6734cb7031562f223" alt="Create discount" width="712" height="651" data-path="images/discount-create-modal.png" />
        </Frame>
      </Step>

      <Step title="Set Validity (optional)">
        You can set the validity of the discount:

        * **Lifetime**: The discount is valid until the subscription ends.
        * **One-time at Start**: The discount is applied once on the first invoice.
        * **Limited to x Billing Periods**: The discount is applied for a certain number of billing periods.

        The following options are also available:

        * **Number of Billing Periods**: The number of billing periods for which the discount is valid (only for "Limited to x Billing Periods").
        * **Maximum Redemptions**: The maximum number of redemptions of the discount - only relevant for the cart.
        * **Maximum Redemptions per Customer**: The maximum number of redemptions of the discount per customer - only relevant for the cart.
        * **Valid Until**: The date until which the discount is valid in the cart.

        <Tip>
          The number of redemptions and "Valid Until" are only relevant for the cart. If you want to use the discount for subscription creation, it can be used any number of times.
        </Tip>

        <Frame>
          <img src="https://mintcdn.com/fynnsubscriptionbilling/tzBoVhlU_naKbmRt/images/discount-validity-details.png?fit=max&auto=format&n=tzBoVhlU_naKbmRt&q=85&s=d802e126495a9b5d006524fdd27d9159" alt="Discount validity" width="670" height="423" data-path="images/discount-validity-details.png" />
        </Frame>

        <Info>
          Billing periods are the time periods in which a customer is invoiced for a subscription. Billing periods can be daily, weekly, monthly, or yearly.
        </Info>
      </Step>

      <Step title="Set Product Restrictions (optional)">
        You can restrict the discount to specific products. Under "Valid for Products", you can select the products for which the discount should be valid.
        Under "Excluded Products", you can select products for which the discount should not be valid. Both fields cannot be used simultaneously.

        <Frame>
          <img src="https://mintcdn.com/fynnsubscriptionbilling/tzBoVhlU_naKbmRt/images/discount-product-restrictions.png?fit=max&auto=format&n=tzBoVhlU_naKbmRt&q=85&s=6aee17dfe5084137c6270ce7ad198dfe" alt="Discount product restrictions" width="670" height="199" data-path="images/discount-product-restrictions.png" />
        </Frame>
      </Step>

      <Step title="Create Discount">
        Click **Create Coupon** to create the discount.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Use API">
    Use the [Create Discount](/api-reference/coupon/create-a-coupon) endpoint for this.

    ```bash theme={null}
    POST /coupons
    ```

    Alternatively, you can [retrieve discounts](/api-reference/coupon/get-all-coupons) to get the list of discounts.
  </Tab>
</Tabs>

## Adjust Discount

<Tabs>
  <Tab title="Use Web App">
    You can edit a discount by clicking on the discount in the list and adjusting the values. Click **Save** to save the changes.

    All fields that can be configured when creating a discount are also available when editing.
  </Tab>

  <Tab title="Use API">
    Use the [Update Discount](/api-reference/coupon/update-a-coupon) endpoint for this.

    ```bash theme={null}
    PUT /coupons/{id}
    ```
  </Tab>
</Tabs>

## Delete Discount

<Tabs>
  <Tab title="Use Web App">
    You can delete a discount by clicking on the three dots next to the discount in the list and selecting **Delete**. Confirm the action to delete the discount.

    <Tip>
      If the discount is already used in a subscription or cart, it cannot be deleted, only deactivated.
    </Tip>
  </Tab>

  <Tab title="Use API">
    Use the [Delete Discount](/api-reference/coupon/delete-a-coupon) endpoint for this.

    ```bash theme={null}
    DELETE /coupons/{id}
    ```

    Alternatively, you can [retrieve discounts](/api-reference/coupon/get-all-coupons).
  </Tab>
</Tabs>

## Coupon Codes

Each discount can be redeemed via the **Code** in the [Checkout](/guide/checkout/introduction).
Currently, it is not possible to create multiple coupon codes for the same discount.

## Use Discount in Subscription

Existing discounts can be used when creating a subscription, or alternatively, a custom discount can be created for that subscription.
To use a discount in a subscription, please read the [subscription creation guide](/guide/subscriptions/introduction).

## Discounts and MRR (Monthly Recurring Revenue)

When calculating MRR (Monthly Recurring Revenue), **only lifetime discounts** are considered. One-time and cycle-specific discounts are not included in the calculation.
