> 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/start-a-new-basket-session-ingamecart.md).

# Start a new basket session (InGameCart)

This assumes you are not using the built-in **StoreBrowser**, which automatically manages the cart for you if enabled.

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

public class StoreController : MonoBehaviour
{
    [SerializeField] InGameCart cart;

    // Call this once when the player opens the store.
    // Pass the in-game username; alternatively use NewBasketWithEmail().
    public void StartSession(string playerUsername)
    {
        cart.NewBasketWithUsername(playerUsername);
    }

    // Call this when the player clicks "Add to Cart" on a product.
    public void OnAddToCart(Package package)
    {
        cart.AddPackage(package);
        cart.Open(); // Slide the cart into view
    }
}
```
