> 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/examples/basic-reward-delivery-pattern.md).

# Basic reward delivery pattern

This is a basic rewards system that utilizes the **InGameCart** and **Deliverables** helpers included with our SDK.

{% hint style="info" %}
This is only an example and not a requirement for using the SDK. You can implement your own reward delivery per your requirements.\
\
Tebex also supports delivery with game server commands via the **Plugin API** and **Webhooks** sent to a backend you control.
{% endhint %}

```csharp
using Tebex.TebexUnity;
using Tebex.Headless;
using UnityEngine;

public class RewardManager : MonoBehaviour
{
    [SerializeField] Deliverables deliverables;
    [SerializeField] InGameCart cart;

    // Assume you have these packages (fetched from Tebex.Packages or Tebex.PackageLookup)
    [SerializeField] int goldPackageId = 1001;
    [SerializeField] int mountPackageId = 1002;

    void Start()
    {
        // Register what to do when each package is purchased.
        deliverables.RegisterDeliverableAction(goldPackageId, OnGoldPurchased);
        deliverables.RegisterDeliverableAction(mountPackageId, OnMountPurchased);
    }

    // After the player creates a basket and proceeds to checkout,
    // hand the basket to Deliverables so it starts polling.
    public void BeginWaitingForPayment()
    {
        Basket basket = cart.ActiveBasket;
        if (basket != null)
        {
            deliverables.SetActiveBasket(basket);
        }
    }

    void OnGoldPurchased(BasketPackage package)
    {
        int qty = package.in_basket.quantity;
        Debug.Log($"Player bought {qty}x {package.name}. Awarding gold...");
        // PlayerInventory.AddGold(qty * 1000);
    }

    void OnMountPurchased(BasketPackage package)
    {
        Debug.Log($"Player purchased: {package.name}. Unlocking mount...");
        // PlayerMounts.Unlock("DragonMount");
    }
}
```
