discount
A discount applied to a cart, line item, or order.
Properties
The amount of the discount in the currency's subunit.
Note: This is the same value as <a href="/docs/api/liquid/objects/discount#discount-total_amount"><code><span class="PreventFireFoxApplyingGapToWBR">discount.total<wbr/>_amount</span></code></a>.
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.
Tip:Use money filters to output a formatted amount.
Tip: Use <a href="/docs/api/liquid/filters/money-filters">money filters</a> to output a formatted amount.
The customer-facing name of the discount.
NoteThis is the same value as
discount.title.Note:This is the same value as
discount.title.Note: This is the same value as <a href="/docs/api/liquid/objects/discount#discount-title"><code>discount.title</code></a>.
The amount of the discount as a negative value, in the currency's subunit.
Note: This is the same value as <a href="/docs/api/liquid/objects/discount#discount-total_savings"><code><span class="PreventFireFoxApplyingGapToWBR">discount.total<wbr/>_savings</span></code></a>. 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.
Tip:Use money filters to output a formatted amount.
Tip: Use <a href="/docs/api/liquid/filters/money-filters">money filters</a> to output a formatted amount.
The customer-facing name of the discount.
NoteThis is the same value as
discount.code.Note:This is the same value as
discount.code.Note: This is the same value as <a href="/docs/api/liquid/objects/discount#discount-code"><code>discount.code</code></a>.
The amount of the discount in the currency's subunit.
NoteThis is the same value as
discount.amount.Note:This is the same value as
discount.amount.Note: This is the same value as <a href="/docs/api/liquid/objects/discount#discount-amount"><code>discount.amount</code></a>.
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.
Tip:Use money filters to output a formatted amount.
Tip: Use <a href="/docs/api/liquid/filters/money-filters">money filters</a> 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.Note:This is the same value as
discount.savings. The value is output in the customer's local (presentment) currency.Note: This is the same value as <a href="/docs/api/liquid/objects/discount#discount-savings"><code>discount.savings</code></a>. 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.
Tip:Use money filters to output a formatted amount.
Tip: Use <a href="/docs/api/liquid/filters/money-filters">money filters</a> to output a formatted amount.
Example
{
"amount": "40.00",
"code": "DIY",
"savings": "-40.00",
"title": "DIY",
"total_amount": "40.00",
"total_savings": "-40.00",
"type": "PercentageDiscount"
}