> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gamavas.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Test mode

> Try buying your own game, refunds and webhooks without paying, with test purchases only you and your testers can make.

Test mode lets you build and check your whole purchase flow for free.

## Turn it on

Add your testers by Gamavas handle on your app's **Store** page. Then turn on test mode in your game:

```js Web theme={"theme":{"light":"github-light","dark":"github-dark"}}
const pass = GamavasPass.create({ clientId: "YOUR_CLIENT_ID", test: true });
```

```csharp Unity theme={"theme":{"light":"github-light","dark":"github-dark"}}
GamavasPass.Init("YOUR_CLIENT_ID", new GamavasPassOptions { Test = true });
```

```gdscript Godot theme={"theme":{"light":"github-light","dark":"github-dark"}}
GamavasPass.init("YOUR_CLIENT_ID", { "test": true })
```

```gml GameMaker theme={"theme":{"light":"github-light","dark":"github-dark"}}
gamavas_init_ext("YOUR_CLIENT_ID", { test: true });
```

```lua Defold theme={"theme":{"light":"github-light","dark":"github-dark"}}
gamavas.init("YOUR_CLIENT_ID", { test = true })
```

In Construct, tick the object's **Test mode** property.

## What changes

* The checkout offers a free **Complete test purchase** button and **Simulate a failed payment**, instead of card and coins.
* Only you and your testers can use it. Anyone else gets an error.
* `owns()` and `purchase()` see **test purchases only**. Even you don't own your game in test mode until you make a test purchase.
* A test purchase never counts in live mode, so it can't unlock the real game.

## Test refunds and webhooks

Refund a test purchase from the **Store** page to buy again, and to see your refund handling. Test purchases send the real webhooks (`order.paid`, `order.refunded`, `entitlement.revoked`) with `"livemode": false`, so your server can tell them apart.

## On your server

Secret keys come in two kinds:

| Key | Sees |
| - | - |
| `gmv_sk_test_…` | Test purchases only |
| `gmv_sk_live_…` | Real purchases only |

Use a test key in development and a live key in production.

> [!WARNING]
>
> Turn test mode off before you ship. A game left in test mode would tell real buyers they don't own it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.