> For the complete documentation index, see [llms.txt](https://docs.spiroq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spiroq.com/en/guides/navody/everyday-operation/slevovy-kod.md).

# Discount code

The customer enters the code in the cart on the machine, before payment. The machine checks whether the code is valid. **Without internet the code does not go through** — the machine does not store a list of codes.

Discount codes are available from the **Pro** plan. On the Starter plan the machine rejects the code.

## Creating one

**Discount codes → New code.** The **New discount code** dialog opens.

| Field                 | Required | Meaning                                                                                                                                                                          |
| --------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Code                  | yes      | The text the customer enters in the cart. It must be unique. It is saved in uppercase. After saving you can no longer change it.                                                 |
| Discount type         | yes      | **Percentage (%)** or **Fixed amount**. The default is percentage.                                                                                                               |
| Value (%)             | yes      | For a percentage discount. A number in percent, for example `20` = a 20% discount on the cart amount.                                                                            |
| Value (CZK)           | yes      | For a fixed amount. An amount in the account currency that is subtracted from the cart, at most up to the cart total. The label uses that currency, for example **Value (EUR)**. |
| Currency              | no       | Only for a fixed amount. Default CZK.                                                                                                                                            |
| Valid from            | no       | From when the code is valid. Empty = immediately.                                                                                                                                |
| Valid to              | no       | Until when the code is valid. Empty = no end.                                                                                                                                    |
| Min. cart value (CZK) | no       | The cart must reach at least this amount. Empty = no limit. The label uses the account currency, for example **Min. cart value (EUR)**.                                          |
| Max. number of uses   | no       | How many times the code goes through. Empty = unlimited. One use is the whole purchase, not each item.                                                                           |
| Description           | no       | A note for you in the Hub. The customer does not see it on the machine.                                                                                                          |
| Active                | no       | The default is on. The machine rejects a turned-off code.                                                                                                                        |

The code applies to **all machines** of your account. **The percentage, the amount, the validity, and the use limit** can be changed after saving. The next purchase takes the new value. An old sale remembers the discount that applied at that time.

## Compensation voucher after a failed dispense

When the card charges the money and the goods are not dispensed, the machine can send a compensation voucher by e-mail. This code is generated automatically. In the list you recognize it by Source: Compensation. More information is on the [Refunds and a voucher](/en/guides/navody/troubleshooting/vraceni-penez.md) page.
