> For the complete documentation index, see [llms.txt](https://docs.payrexx.com/developer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payrexx.com/developer/general-info/objects/invoice/discount.md).

# Discount

### Content

<table><thead><tr><th width="231.6796875">Key</th><th width="154.80078125">Type</th><th>Description</th></tr></thead><tbody><tr><td>code</td><td>string|null</td><td>The code used in the checkout</td></tr><tr><td>amount</td><td>int</td><td>The amount that has been deducted from applying the discount</td></tr><tr><td>percentage</td><td>float|null</td><td>How much discount is applied if it is of type <code>percent</code></td></tr></tbody></table>

### Examples

```json
{
  "code": null,
  "amount": 0,
  "percentage": null
}
```

```json
{
  "code": "Winter-Sale",
  "amount": 2000,
  "percentage": "20.00"
}
```

```json
{
  "code": "Summer-Sale",
  "amount": 2500,
  "percentage": null
}
```

### Changelog

<details>

<summary>2019-10-15</summary>

The type of `amount` changes from `float` to `int`. The price is now displayed in the currency's smallest unit.

</details>
