discount
Collection: discounts
Discounts are historical records of coupons used in a transaction.
Required Scopes
store_full_access transactions_read transactions_write Actions
Properties (8)
code String · Read-only The original coupon code used for this discount.
amount Number · Read-only The amount of the discount.
name String · Read-only The original coupon name used for this discount.
display String · Read-only The discount displayed in the format of the currency the transaction took place in.
is_taxable Boolean · Read-only Whether or not this discount was taxable.
is_future_discount Boolean · Read-only Whether or not this discount is part of a subscription that is to be charged in the future based on when this transaction was processed.
date_created String (nullable) · Read-only The date this resource was created.
date_modified String (nullable) · Read-only The date this resource was last modified.
Link Relations (8)
self This Discount Only present when the discount has an associated coupon code.
Only present when this discount belongs to a completed transaction.
Only present when this discount belongs to an incomplete transaction (cart).
Example Representation
{
"_links": {
"curies": [
{
"name": "fx",
"href": "https://api.foxycart.com/rels/{rel}",
"templated": true
}
],
"self": {
"href": "https://api.foxycart.com/discounts/123",
"title": "This Discount"
},
"fx:store": {
"href": "https://api.foxycart.com/stores/456",
"title": "This Store"
},
"fx:customer": {
"href": "https://api.foxycart.com/customers/789",
"title": "This Customer"
},
"fx:coupon": {
"href": "https://api.foxycart.com/coupons/999",
"title": "This Coupon"
},
"fx:coupon_code": {
"href": "https://api.foxycart.com/coupon_codes/456",
"title": "This Coupon Code"
}
},
"code": "tester",
"amount": -1,
"name": "tester",
"display": "-1.00",
"is_taxable": false,
"is_future_discount": false,
"date_created": null,
"date_modified": null
}