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

# View a Client Wallet

### Path parameters

<ParamField path="FundsType" type="string" required>
  **Allowed values:** `FEES`, `CREDIT`

  The type of funds in the Client Wallet:

  * `FEES` – Fees Wallet, for fees collected by the platform, specific to the Client Wallet object.
  * `CREDIT` – Repudiation Wallet, for funds for the platform's dispute management, specific to the Client Wallet object.

  **Note:** The Fees Wallet and Repudiation Wallet are created automatically by Mangopay for each currency.
</ParamField>

<ParamField path="Currency" type="string" required>
  **Allowed values:** The three-letter <a href="/api-reference/overview/data-formats" target="_blank">ISO 4217 code</a> (EUR, GBP, etc.) of a <a href="/guides/currencies" target="_blank">supported currency</a> (depends on feature, contract, and activation settings).

  The currency of the wallet.
</ParamField>

### Responses

<AccordionGroup>
  <Accordion title="200" defaultOpen>
    <ResponseField name="Balance" type="object">
      The current balance of the wallet.

      <Expandable title="properties">
        <ResponseField name="Currency" type="string">
          **Returned values:** The three-letter <a href="/api-reference/overview/data-formats" target="_blank">ISO 4217 code</a> (EUR, GBP, etc.) of a <a href="/guides/currencies" target="_blank">supported currency</a> (depends on feature, contract, and activation settings).

          The currency of the balance.
        </ResponseField>

        <ResponseField name="Amount" type="integer">
          An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`).
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="Currency" type="string">
      **Returned values:** The three-letter <a href="/api-reference/overview/data-formats" target="_blank">ISO 4217 code</a> (EUR, GBP, etc.) of a <a href="/guides/currencies" target="_blank">supported currency</a> (depends on feature, contract, and activation settings).

      The currency of the wallet.
    </ResponseField>

    <ResponseField name="FundsType" type="string">
      **Returned values:** `DEFAULT`, `FEES`, `CREDIT`

      The type of funds in the wallet:

      * `DEFAULT` – Regular funds for user-owned wallets. Wallets with this `FundsType` cannot have a negative balance.
      * `FEES` – Fees Wallet, for fees collected by the platform, specific to the Client Wallet object.
      * `CREDIT` – Repudiation Wallet, for funds for the platform's dispute management, specific to the Client Wallet object.

      **Note:** The Fees Wallet and Repudiation Wallet are created automatically by Mangopay for each currency.
    </ResponseField>

    <ResponseField name="Id" type="string">
      The unique identifier of the wallet.

      The `Id` of Client Wallet object has the format `FundsType`\_`Currency`, for example: `FEES_EUR`, `CREDIT_GBP`, etc.
    </ResponseField>

    <ResponseField name="Tag" type="string">
      Max. length: 255 characters

      Custom data that you can add to this object.\
      For wallets, you can use this parameter to identify the corresponding end user in your platform.
    </ResponseField>

    <ResponseField name="CreationDate" type="Unix timestamp">
      The date and time at which the wallet was created.
    </ResponseField>
  </Accordion>
</AccordionGroup>

<ResponseExample>
  ```json 200   theme={null}
  {
      "Balance": {
          "Currency": "EUR",
          "Amount": 2027
      },
      "Currency": "EUR",
      "FundsType": "FEES",
      "Id": "FEES_EUR",
      "Tag": null,
      "CreationDate": 1658926202
  }  
  ```
</ResponseExample>

<RequestExample>
  ```javascript NodeJS   theme={null}
  const mangopayInstance = require('mangopay4-nodejs-sdk')
  const mangopay = new mangopayInstance({
      clientId: 'your-client-id',
      clientApiKey: 'your-api-key',
  })

  let myWallet = {
    FundsType: 'FEES',
    Currency: 'EUR',
  }

  const viewClientWallet = async (fundsType, currency) => {
    return await mangopay.Clients.getClientWallet(fundsType, currency)
      .then((response) => {
        console.info(response)
        return response
      })
      .catch((err) => {
        console.log(err)
        return false
      })
  }

  viewClientWallet(myWallet.FundsType, myWallet.Currency)  
  ```

  ```ruby Ruby  theme={null}
  require 'mangopay'

  MangoPay.configure do |client|
      client.preproduction = true
      client.client_id = 'your-client-id'
      client.client_apiKey = 'your-api-key'
      client.log_file = File.join(Dir.pwd, 'mangopay.log')
  end

  def viewClientWallet(fundsType, currency)
      begin
          response = MangoPay::Client.fetch_wallet(fundsType, currency)
          puts response
          return response
      rescue MangoPay::ResponseError => error
          puts "Failed to fetch client wallets: #{error.message}"
          puts "Error details: #{error.details}"
          return false
      end
  end

  myClientWallet = {
      FundsType: 'FEES',
      Currency: 'EUR'
  }

  viewClientWallet(myClientWallet[:FundsType], myClientWallet[:Currency])
  ```

  ```php PHP theme={null}
  <?php

  require_once 'vendor/autoload.php';

  use MangoPay\MangoPayApi;
  use MangoPay\Libraries\ResponseException as MGPResponseException;
  use MangoPay\Libraries\Exception as MGPException;

  $api = new MangoPayApi();

  $api->Config->ClientId = 'your-client-id';
  $api->Config->ClientPassword = 'your-api-key';
  $api->Config->TemporaryFolder = '/tmp/';

  try {

      // $fundsType = MangoPay\FundsType::FEES;
      $fundsType = MangoPay\FundsType::CREDIT;
      $response = $api->Clients->GetWallets($fundsType);

      print_r($response);
  } catch(MGPResponseException $e) {
      print_r($e);
  } catch(MGPException $e) {
      print_r($e);
  }  
  ```

  ```java Java   theme={null}
  import com.google.gson.Gson;
  import com.google.gson.GsonBuilder;
  import com.mangopay.MangoPayApi;
  import com.mangopay.core.Money;
  import com.mangopay.core.enumerations.CurrencyIso;
  import com.mangopay.core.enumerations.FundsType;
  import com.mangopay.entities.Wallet;

  public class ViewClientWallet {
      public static void main(String[] args) throws Exception {
          MangoPayApi mangopay = new MangoPayApi();
          mangopay.getConfig().setClientId("your-client-id");
          mangopay.getConfig().setClientPassword("your-api-key");

          Wallet clientWallet = mangopay.getClientApi().getWallet(FundsType.FEES, CurrencyIso.EUR);

          Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
          String prettyJson = prettyPrint.toJson(updateUbo);

          System.out.println(clientWallet);
      }
  }
  ```

  ```python Python   theme={null}
  from pprint import pprint
  import mangopay

  mangopay.client_id='your-client-id'
  mangopay.apikey='your-api-key'

  from mangopay.api import APIRequest
  handler = APIRequest(sandbox=True)

  from mangopay.resources import ClientWallet

  client_wallet = ClientWallet.get(funds_type = 'FEES', currency = 'GBP') 

  pprint(vars(client_wallet))  
  ```

  ```csharp .NET  theme={null}
  using MangoPay.SDK;
  using MangoPay.SDK.Core.Enumerations;
  using Newtonsoft.Json;

  class Program
  {
      static async Task Main(string[] args)
      {
          MangoPayApi api = new MangoPayApi();

          api.Config.ClientId = "your-client-id";
          api.Config.ClientPassword = "your-api-key";

          var viewWallet = await api.Clients.GetWalletAsync(FundsType.FEES, CurrencyIso.EUR, null);    

          string prettyPrint = JsonConvert.SerializeObject(viewWallet, Formatting.Indented);
          Console.WriteLine(prettyPrint);
      }
  }
  ```
</RequestExample>
