# DiscountCodeAppInput - admin - INPUT_OBJECT
Version: 2025-01

## Description
The input fields for creating or updating a code discount, where the discount type is provided by an app extension that uses [Shopify Functions](https://shopify.dev/docs/apps/build/functions).


Use these input fields when you need advanced or custom discount capabilities that aren't supported by [Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types).

### Access Scopes



## Fields
* [appliesOnOneTimePurchase](/docs/api/admin/2025-01/scalars/Boolean): Boolean - Whether the discount applies on regular one-time-purchase items.
* [appliesOnSubscription](/docs/api/admin/2025-01/scalars/Boolean): Boolean - Whether the discount applies to subscriptions items.
* [appliesOncePerCustomer](/docs/api/admin/2025-01/scalars/Boolean): Boolean - Whether a customer can only use the discount once.
* [code](/docs/api/admin/2025-01/scalars/String): String - The code that customers use to apply the discount.
* [combinesWith](/docs/api/admin/2025-01/input-objects/DiscountCombinesWithInput): DiscountCombinesWithInput - The
[discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations)
that you can use in combination with
[Shopify discount types](https://help.shopify.com/manual/discounts/discount-types).
* [customerSelection](/docs/api/admin/2025-01/input-objects/DiscountCustomerSelectionInput): DiscountCustomerSelectionInput - The customers that can use the discount.
* [endsAt](/docs/api/admin/2025-01/scalars/DateTime): DateTime - The date and time when the discount expires and is no longer available to customers.
For discounts without a fixed expiration date, specify `null`.
* [functionId](/docs/api/admin/2025-01/scalars/String): String - The [function ID](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries) associated with the app extension that's providing the [discount type](https://help.shopify.com/manual/discounts/discount-types).
* [metafields](/docs/api/admin/2025-01/input-objects/MetafieldInput): MetafieldInput - Additional metafields to associate to the discount. [Metafields](https://shopify.dev/docs/apps/build/custom-data) provide dynamic function configuration with different parameters, such as `percentage` for a percentage discount. Merchants can set metafield values in the Shopify admin, which makes the discount function more flexible and customizable.
* [recurringCycleLimit](/docs/api/admin/2025-01/scalars/Int): Int - The number of times a discount applies on recurring purchases (subscriptions).         0 will apply infinitely whereas 1 will only apply to the first checkout.
* [startsAt](/docs/api/admin/2025-01/scalars/DateTime): DateTime - The date and time when the discount becomes active and is available to customers.
* [title](/docs/api/admin/2025-01/scalars/String): String - The discount's name that displays to merchants in the Shopify admin and to customers.
* [usageLimit](/docs/api/admin/2025-01/scalars/Int): Int - The maximum number of times that a customer can use the discount.
For discounts with unlimited usage, specify `null`.


## Input objects with this input object
* [discountCodeAppCreate](/docs/api/admin/2025-01/mutations/discountCodeAppCreate)
* [discountCodeAppUpdate](/docs/api/admin/2025-01/mutations/discountCodeAppUpdate)


## Examples