> For the complete documentation index, see [llms.txt](https://docs.tebex.io/developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tebex.io/developers/unity-engine/features/qr-code-generator.md).

# QR Code Generator

The Tebex Unity SDK includes a QR code generator that can create a `Texture2D` of a Tebex checkout link.&#x20;

No additional dependencies are required in your project to generate the code.

This enables customers to checkout with a mobile device by scanning a code shown in-game.

<figure><img src="/files/VTs2NCFtzxAH5XZrL6o6" alt=""><figcaption></figcaption></figure>

### Displaying a QR Code

QR codes can be generated by using

```
Utilities.QrToTexture(QrCode.Encode("https://tebex.io/path/to/checkout"));
```

which will create a `Texture2D` containing the QR code.

You can customize the `scale` and `quietZone` (whitespace) of the generated QR code.

{% hint style="info" %}
The QR code generator will only create codes for URLs that direct to a Tebex basket.
{% endhint %}

### Using with the In Game Cart

The in-game cart can be configured to enable or disable showing QR codes, per your requirements.&#x20;

This can be toggled on/off via the Inspector on the GameObject where you have attached the InGameCart component.
