# Use Wallets In-Game

### Get Player Wallet

#### Get Player Wallet by Holder ID

{% tabs %}
{% tab title="Unity" %}

```csharp
string holderUlid; //holderUlid can be found in the start Session calls as response.player_ulid
LootLocker.LootLockerEnums.LootLockerWalletHolderTypes player = LootLocker.LootLockerEnums.LootLockerWalletHolderTypes.player;
LootLockerSDKManager.GetWalletByHolderId(holderUlid, player, (response) =>
{
    if(!response.success)
    {
        //If wallet is not found, it will automatically create one on the holder.
        Debug.Log("error: " + response.errorData.message);
        Debug.Log("request ID: " + response.errorData.request_id);
        return;
    }

});
```

To see what data gets returned, please refer to our [Reference Documentation](https://ref.lootlocker.com/game-api/#get-wallet-for-holder).
{% endtab %}

{% tab title="Unreal" %}

<figure><img src="/files/MxuAjlLfsBtpxKfjJwTw" alt=""><figcaption><p><a href="https://blueprintue.com/blueprint/u11a1ibd/">Blueprint example of getting a players wallet</a></p></figcaption></figure>
{% endtab %}
{% endtabs %}

#### Get Character Wallet by Holder ID

{% tabs %}
{% tab title="Unity" %}

```csharp
string holderUlid; //holderUlid can be found in the start Session calls as response.player_ulid
LootLocker.LootLockerEnums.LootLockerWalletHolderTypes character = LootLocker.LootLockerEnums.LootLockerWalletHolderTypes.character;
LootLockerSDKManager.GetWalletByHolderId(holderUlid, character, (response) =>
{
    if(!response.success)
    {
        //If wallet is not found, it will automatically create one on the holder.
        Debug.Log("error: " + response.errorData.message);
        Debug.Log("request ID: " + response.errorData.request_id);
        return;
    }

});
```

To see what data gets returned, please refer to our [Reference Documentation](https://ref.lootlocker.com/game-api/#get-wallet-for-holder).
{% endtab %}

{% tab title="Unreal" %}

<figure><img src="/files/RvvD7di4L2mXJET8Ux2r" alt=""><figcaption><p><a href="https://blueprintue.com/blueprint/u11a1ibd/">Blueprint example of getting a characters wallet</a></p></figcaption></figure>
{% endtab %}
{% endtabs %}

#### Get Wallet by Wallet ID

{% tabs %}
{% tab title="Unity" %}

```csharp
string WalletID = "";
LootLockerSDKManager.GetWalletByWalletId(walletID, (response) =>
{
    if(!response.success)
    {
        Debug.Log("error: " + response.errorData.message);
        Debug.Log("request ID: " + response.errorData.request_id);
        return;
    }

});
```

To see what data gets returned, please refer to our [Reference Documentation](https://ref.lootlocker.com/game-api/#get-wallet).
{% endtab %}

{% tab title="Unreal" %}

<figure><img src="/files/PYkOZ0WtvuZ1M33cF2gN" alt=""><figcaption><p><a href="https://blueprintue.com/blueprint/fmu7-b-l/">Blueprint example of getting a wallet by wallet id</a></p></figcaption></figure>
{% endtab %}
{% endtabs %}

### Credit / Debit Wallet

#### Credit Wallet

{% tabs %}
{% tab title="Unity" %}

```csharp
string WalletID = "";
string currencyID = "";
string amount = "100";
LootLockerSDKManager.CreditBalanceToWallet(walletID, currencyID, amount, (response) =>
{
    if(!response.success)
     {
         Debug.Log("error: " + response.errorData.message);
         Debug.Log("request ID: " + response.errorData.request_id);
         return;
    }

});
```

To see what data gets returned, please refer to our [Reference Documentation](https://ref.lootlocker.com/game-api/#credit-balance).
{% endtab %}

{% tab title="Unreal" %}

<figure><img src="/files/mLwcAWgekBPDBEs5fPLr" alt=""><figcaption><p><a href="https://blueprintue.com/blueprint/64z5pwwk/">Blueprint example of giving credit to a wallet</a></p></figcaption></figure>
{% endtab %}
{% endtabs %}

#### Debit Wallet

{% tabs %}
{% tab title="Unity" %}

<pre class="language-csharp"><code class="lang-csharp">string WalletID = "";
string currencyID = "";
string amount = "100";
<strong>LootLockerSDKManager.DebitBalanceToWallet(walletID, currencyID, amount, (response) =>
</strong>{
    if(!response.success)
     {
         Debug.Log("error: " + response.errorData.message);
         Debug.Log("request ID: " + response.errorData.request_id);
         return;
     }

});
</code></pre>

To see what data gets returned, please refer to our [Reference Documentation](https://ref.lootlocker.com/game-api/#debit-balance).
{% endtab %}

{% tab title="Unreal" %}

<figure><img src="/files/beYGdoQ5ybZRiCfmkqVt" alt=""><figcaption><p><a href="https://blueprintue.com/blueprint/pcfqo5or/">Blueprint example of debiting a balance from a wallet</a></p></figcaption></figure>
{% endtab %}
{% endtabs %}

#### List Balances in Wallet

{% tabs %}
{% tab title="Unity" %}

```csharp
string walletID = "";
LootLockerSDKManager.ListBalancesInWallet(walletID, (response) =>
{
    if(!response.success)
    {
        Debug.Log("error: " + response.errorData.message);
        Debug.Log("request ID: " + response.errorData.request_id);
        return;
    }

});
```

To see what data gets returned, please refer to our [Reference Documentation](https://ref.lootlocker.com/game-api/#list-balances).
{% endtab %}

{% tab title="Unreal" %}

<figure><img src="/files/SBE2VYbRQSabLJj50dOc" alt=""><figcaption><p><a href="https://blueprintue.com/blueprint/m4z21mzk/">Blueprint example of listing balances in a wallet</a></p></figcaption></figure>
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lootlocker.com/commerce/wallets/how-to/wallets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
