--- title: "Liquid objects: discount" description: A discount applied to a cart, line item, or order. api_name: liquid source_url: html: https://shopify.dev/docs/api/liquid/objects/discount md: https://shopify.dev/docs/api/liquid/objects/discount.md --- # discount A discount applied to a cart, line item, or order. deprecated Deprecated because not all discount types and details are captured. The `discount` object has been replaced by the [`discount_allocation`](https://shopify.dev/docs/api/liquid/objects/discount_allocation) and [`discount_application`](https://shopify.dev/docs/api/liquid/objects/discount_application) objects. ## Properties * * amount [number](https://shopify.dev/docs/api/liquid/basics#number) * The amount of the discount in the currency's subunit. Note This is the same value as [`discount.total_amount`](https://shopify.dev/docs/api/liquid/objects/discount#discount-total_amount). The value is output in the customer's local (presentment) currency. For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000. Tip Use [money filters](https://shopify.dev/docs/api/liquid/filters/money-filters) to output a formatted amount. * code [string](https://shopify.dev/docs/api/liquid/basics#string) * The customer-facing name of the discount. Note This is the same value as [`discount.title`](https://shopify.dev/docs/api/liquid/objects/discount#discount-title). * savings [number](https://shopify.dev/docs/api/liquid/basics#number) * The amount of the discount as a negative value, in the currency's subunit. Note This is the same value as [`discount.total_savings`](https://shopify.dev/docs/api/liquid/objects/discount#discount-total_savings). The value is output in the customer's local (presentment) currency. For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000. Tip Use [money filters](https://shopify.dev/docs/api/liquid/filters/money-filters) to output a formatted amount. * title [string](https://shopify.dev/docs/api/liquid/basics#string) * The customer-facing name of the discount. Note This is the same value as [`discount.code`](https://shopify.dev/docs/api/liquid/objects/discount#discount-code). * total\_​amount [number](https://shopify.dev/docs/api/liquid/basics#number) * The amount of the discount in the currency's subunit. Note This is the same value as [`discount.amount`](https://shopify.dev/docs/api/liquid/objects/discount#discount-amount). The value is output in the customer's local (presentment) currency. For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000. Tip Use [money filters](https://shopify.dev/docs/api/liquid/filters/money-filters) to output a formatted amount. * total\_​savings [number](https://shopify.dev/docs/api/liquid/basics#number) * The amount of the discount as a negative value, in the currency's subunit. Note This is the same value as [`discount.savings`](https://shopify.dev/docs/api/liquid/objects/discount#discount-savings). The value is output in the customer's local (presentment) currency. For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000. Tip Use [money filters](https://shopify.dev/docs/api/liquid/filters/money-filters) to output a formatted amount. * type [string](https://shopify.dev/docs/api/liquid/basics#string) from a set of values * The type of the discount. | Possible values | | - | | FixedAmountDiscount | | PercentageDiscount | | ShippingDiscount | ```json { "amount": "40.00", "code": "DIY", "savings": "-40.00", "title": "DIY", "total_amount": "40.00", "total_savings": "-40.00", "type": "PercentageDiscount" } ```