discount
A discount applied to a cart, line item, or order.
Properties
The amount of the discount in the currency's subunit.
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.
TipUse money filters to output a formatted amount.
The customer-facing name of the discount.
NoteThis is the same value as
discount.title
.The amount of the discount as a negative value, in the currency's subunit.
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.
TipUse money filters to output a formatted amount.
The customer-facing name of the discount.
NoteThis is the same value as
discount.code
.The amount of the discount in the currency's subunit.
NoteThis 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.
TipUse money filters to output a formatted amount.
The amount of the discount as a negative value, in the currency's subunit.
NoteThis 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.
TipUse money filters to output a formatted amount.
{
"amount": "40.00",
"code": "DIY",
"savings": "-40.00",
"title": "DIY",
"total_amount": "40.00",
"total_savings": "-40.00",
"type": "PercentageDiscount"
}