Skip to main content

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 and discount_application objects.

Properties

The amount of the discount in the currency's subunit.

Note

This is the same value as 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 to output a formatted amount.

The customer-facing name of the discount.

Note

This is the same value as discount.title.

The amount of the discount as a negative value, in the currency's subunit.

Note

This is the same value as 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 to output a formatted amount.

The customer-facing name of the discount.

Note

This is the same value as discount.code.

Anchor to
total_amount

The amount of the discount in the currency's subunit.

Note

This is the same value as 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 to output a formatted amount.

Anchor to
total_savings

The amount of the discount as a negative value, in the currency's subunit.

Note

This is the same value as 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 to output a formatted amount.

Anchor to
type
string from a set of values

The type of the discount.

Possible values
FixedAmountDiscount
PercentageDiscount
ShippingDiscount
{
"amount": "40.00",
"code": "DIY",
"savings": "-40.00",
"title": "DIY",
"total_amount": "40.00",
"total_savings": "-40.00",
"type": "PercentageDiscount"
}
Was this section helpful?