> For the complete documentation index, see [llms.txt](https://docs.xandtech.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xandtech.fr/home/xplayercurrencies/features/cheques-and-exchange.md).

# Cheques & Exchange

## Cheques

Lets a player convert part of their **own** balance into a physical item that credits whoever right-clicks it, once - a way to trade currency through items (chests, auction house plugins, trading) instead of only the built-in `/currencies pay`.

```yaml
cheque:
  enabled: true
  min-amount: 1000
  max-amount: 250000    # -1 = no cap besides the player's own balance
  stackable: false
  glow: true
  item: PAPER
  name: "&e&lCheque &7- &f{amount_formatted} {icon_display}"
  lore:
    - "&7A cheque worth &f{amount_formatted} {currency}."
    - ""
    - "&eRight-click to redeem."
```

| Key                         | Description                                                                                                                                                                                                             |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `min-amount` / `max-amount` | Bounds on the amount a single cheque can be created for, on top of the player actually having that much - a cheque can never create money out of thin air.                                                              |
| `stackable`                 | If `false` (default), the item's max stack size is forced to `1` - so what you see in an inventory (1 cheque = 1 slot) always matches its face value.                                                                   |
| `glow`                      | Adds an enchant-glint shimmer.                                                                                                                                                                                          |
| `name` / `lore`             | Accept `{amount}`, `{amount_formatted}`, `{formatted}`, `{currency}`, `{icon_display}` - substituted once, when the cheque is created; the item keeps that exact wording afterward even if these settings change later. |

### Commands

| Command                                                                | Description                                           |
| ---------------------------------------------------------------------- | ----------------------------------------------------- |
| `/currencies cheque <currency> <amount>` (or `/coins cheque <amount>`) | Creates a cheque, debiting your balance.              |
| Right-click the item                                                   | Redeems it, crediting your balance, then consumes it. |

Requires `xplayercurrencies.cheque.create` to create one, `xplayercurrencies.cheque.use` to redeem one (both default `true`).

## Exchange

Lets a player convert part of **this** currency's balance into another one, at a rate set per destination.

```yaml
exchange:
  enabled: false
  rates:
    gems: 0.01
    #other: 0.02
```

Every pair is one-way and opt-in: this currency can convert into whatever's listed, at that rate, regardless of whether the other currency allows converting back - see `gems.yml`, which enables `gems -> coins` at rate `80` while `coins -> gems` stays off in `coins.yml`, a deliberate "spread" like a real currency exchange.

`rates: <destination id>: <units of it per 1 unit of this currency>` - only currencies listed here (and themselves enabled) are valid destinations.

### Commands

| Command                                                                            | Description                                                             |
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `/currencies exchange [<from> <to> <amount>]` (or `/coins exchange <to> <amount>`) | Converts a balance. With no arguments, opens the exchange menu instead. |

Requires `xplayercurrencies.exchange` (default: `true`).

Next: [Death Penalty](/home/xplayercurrencies/features/death-penalty.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.xandtech.fr/home/xplayercurrencies/features/cheques-and-exchange.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
