> ## 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.

# List Client Wallets by FundsType

### 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>

### Responses

<AccordionGroup>
  <Accordion title="200">
    <ResponseField name="Array (Client Wallets)" type="array">
      The list of Client Wallets.

      <Expandable title="properties">
        <ResponseField name="Object (Client Wallet)" type="object">
          The Client Wallet object created by MANGOPAY.

          <Expandable title="properties">
            <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>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Accordion>
</AccordionGroup>

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

<RequestExample>
  ```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/';

  //To get only Fees Wallets
  try {
      $fundsType = \MangoPay\FundsType::FEES;
      $response = $api->Clients->GetWallets($fundsType);

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

  // To only get Credit Wallets 
  try {
      $fundsType = \MangoPay\FundsType::CREDIT
      $response = $api->Clients->GetWallets($fundsType);

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

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

  let myWallets = {
    FundsType: 'FEES',
  }

  //* FundsType may be 'DEFAULT', 'FEES', or 'CREDIT'

  const listClientWalletsByFundsType = async (fundsType) => {
    return await mangopay.Clients.getClientWalletsByFundsType(fundsType)
      .then((response) => {
        console.info(response)
        return response
      })
      .catch((err) => {
        console.log(err)
        return false
      })
  }

  listClientWalletsByFundsType(myWallets.FundsType)  
  ```

  ```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 listClientWalletsByFundsType(fundsType)
      begin
          response = MangoPay::Client.fetch_wallets(fundsType)
          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

  myWallets = {
      FundsType: 'FEES'
  }

  listClientWalletsByFundsType(myWallets[:FundsType])
  ```

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

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

          List<Wallet> clientWallets = mangopay.getClientApi().getWallets(FundsType.FEES, new Pagination(1, 100));

          for (Wallet clientWallet : clientWallets) {
              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_wallets = ClientWallet.all_by_funds_type(fund_type = 'CREDIT')

  for client_wallet in client_wallets:
      pprint(vars(client_wallet))  
  ```

  ```csharp .NET  theme={null}
  using MangoPay.SDK;
  using MangoPay.SDK.Core.Enumerations;
  using MangoPay.SDK.Entities;
  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 clientWallets = await api.Clients.GetWalletsAsync(FundsType.FEES, new Pagination(1, 10));    

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