> 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

Enable checkout with QR codes with a no-dependency 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="https://924803319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaRz9HUAxrYuZsSDWhYnu%2Fuploads%2Fq4hV5artebFH4pjBLLhh%2Fimage.png?alt=media&amp;token=030ea674-3993-485a-af06-2466d93e50e3" 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.
