# `Stripe.Resources.Discount`
[🔗](https://github.com/jeffhuen/tiger_stripe/blob/main/lib/stripe/resources/discount.ex#L2)

Discount

A discount represents the actual application of a [coupon](https://api.stripe.com#coupons) or [promotion code](https://api.stripe.com#promotion_codes).
It contains information about when the discount began, when it will end, and what it is applied to.

Related guide: [Applying discounts to subscriptions](https://docs.stripe.com/billing/subscriptions/discounts)

# `t`

```elixir
@type t() :: %Stripe.Resources.Discount{
  checkout_session: String.t(),
  customer: String.t() | Stripe.Resources.Customer.t(),
  customer_account: String.t(),
  end: integer(),
  id: String.t(),
  invoice: String.t(),
  invoice_item: String.t(),
  object: String.t(),
  promotion_code: String.t() | Stripe.Resources.PromotionCode.t(),
  source: Stripe.Resources.Discount.Source.t(),
  start: integer(),
  subscription: String.t(),
  subscription_item: String.t()
}
```

* `checkout_session` - The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. Max length: 5000. Nullable.
* `customer` - The ID of the customer associated with this discount. Nullable. Expandable.
* `customer_account` - The ID of the account representing the customer associated with this discount. Max length: 5000. Nullable.
* `end` - If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. Format: Unix timestamp. Nullable.
* `id` - The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. Max length: 5000.
* `invoice` - The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. Max length: 5000. Nullable.
* `invoice_item` - The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. Max length: 5000. Nullable.
* `object` - String representing the object's type. Objects of the same type share the same value. Possible values: `discount`.
* `promotion_code` - The promotion code applied to create this discount. Nullable. Expandable.
* `source` - Expandable.
* `start` - Date that the coupon was applied. Format: Unix timestamp.
* `subscription` - The subscription that this coupon is applied to, if it is applied to a particular subscription. Max length: 5000. Nullable.
* `subscription_item` - The subscription item that this coupon is applied to, if it is applied to a particular subscription item. Max length: 5000. Nullable.

# `expandable_fields`

# `object_name`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
