Skip to main content

View Accounts

Fondy provides powerful tools for viewing and managing your account details. Whether you need to access information for a single account or an overview of multiple accounts, the View Account Details and View All Accounts features ensure transparency and control over your financial operations.

View Account Details

The View Account Details feature allows users to retrieve comprehensive information about individual accounts. This includes essential details like account type, status, currency, and transaction history.

Viewing Account Details in the Dashboard

  1. Access the Account Dashboard

    • Log in to your account dashboard using your credentials.
    • Navigate to the Account section and select View Account Details.
  2. Retrieve Account Information

    • Click on View Account Details to display detailed account information, such as:

      • Business name and contact details;
      • Account status (e.g., Active, Pending, Suspended);
      • Transaction history;
      • Billing and payment details;
      • User roles and permissions.
  3. Updating Information

    • Use the Edit or Update buttons adjacent to the relevant fields to update account details.
    • Save your changes to ensure your account information remains current.
  4. Download and Export Data

    • Export account details and transaction history in formats like CSV, PDF, or Excel for record-keeping or analysis.

Viewing Account Details via API

All interactions with the Fondy API are done through the Encrypted Endpoint. To retrieve detailed information about a specific account, follow the API integration steps below:

  1. Encrypt the Request

    • Generate an AES Key:

      KeyGenerator keyGen = KeyGenerator.getInstance("AES");
      keyGen.init(128);
      SecretKey aesKey = keyGen.generateKey();
    • Encrypt the AES Key with Fondy's RSA Public Key:

      Cipher rsaCipher = Cipher.getInstance("RSA");
      rsaCipher.init(Cipher.ENCRYPT_MODE, fondyPublicKey);
      byte[] encryptedAESKey = rsaCipher.doFinal(aesKey.getEncoded());
      String base64EncryptedAESKey = Base64.getEncoder().encodeToString(encryptedAESKey);
    • Encrypt the JSON Payload Using the AES Key:

      Cipher aesCipher = Cipher.getInstance("AES");
      aesCipher.init(Cipher.ENCRYPT_MODE, aesKey);
      byte[] encryptedPayload = aesCipher.doFinal(payload.getBytes());
      String base64EncryptedPayload = Base64.getEncoder().encodeToString(encryptedPayload);
    • Combine the Encrypted Components:

      String combined = base64EncryptedAESKey + "-----" + base64EncryptedPayload;
      String finalEncryptedRequest = Base64.getEncoder().encodeToString(combined.getBytes());
  2. Sign the Request

      String stringToSign = encObject.encrypted_url + encObject.method + encObject.encrypted_payload + encObject.encrypted_user;

    Signature sig = Signature.getInstance("SHA256WithRSA");
    sig.initSign(getPrivateKey());
    sig.update(stringToSign.getBytes());
    byte[] signature = sig.sign();

    return Base64.getEncoder().encodeToString(signature);
  3. Send the Request

    • Endpoint to encrypt: /accounts/{account_id}

    • Method: POST

      WebClient webClient = WebClient.create("https://api.fondyflow.io");
      EncryptedObject encryptedRequest = buildEncryptedRequest(payload, url, "POST", user);

      EncryptedObject response = webClient.post()
      .url("/clientapi/encrypted/v1/{clientRef}")
      .contentType(MediaType.APPLICATION_JSON)
      .body(Mono.just(encryptedRequest), EncryptedObject.class)
      .retrieve()
      .bodyToMono(EncryptedObject.class)
      .block();
  4. Decrypt the Response

    • Decode the Response:

      private static String decodeString(String encryptedPayload) throws Exception {
      String decoded = new String(Base64.getDecoder().decode(encryptedPayload));
      String[] parts = decoded.split(DELIMITER);
      byte[] rsaEncryptedAESKey = Base64.getDecoder().decode(parts[0]);
      byte[] aesEncryptedPayload = Base64.getDecoder().decode(parts[1]);

      Cipher rsaCipher = Cipher.getInstance("RSA");
      rsaCipher.init(Cipher.DECRYPT_MODE, getPrivateKey());
      byte[] aesKeyBytes = rsaCipher.doFinal(rsaEncryptedAESKey);
      SecretKeySpec aesKey = new SecretKeySpec(aesKeyBytes, "AES");

      Cipher aesCipher = Cipher.getInstance("AES");
      aesCipher.init(Cipher.DECRYPT_MODE, aesKey);
      byte[] decryptedBytes = aesCipher.doFinal(aesEncryptedPayload);

      return new String(decryptedBytes);

View All Accounts

The View All Accounts feature provides an easy way to manage and monitor multiple accounts in one place. Gain comprehensive insights into your financial landscape, including account names, IBAN/Sort Codes, balances, and statuses.

Viewing All Accounts in the Dashboard

  1. Access the Account Overview

    • Log in to your primary account dashboard.
    • Navigate to the Accounts section and select View All Accounts.
  2. Account List Display

    • A list of all your linked accounts will appear, showing essential details like:

      • Account names;
      • Statuses (Active, Pending, Suspended);
      • Key contact information.
  3. Detailed Account Information

    • Click on any account to view more detailed information, including:

      • Business details;
      • Transaction history;
      • User roles and permissions.
  4. Sorting and Filtering

    • Use sorting options to organize accounts by criteria such as name, status, or creation date.
    • Apply filters to narrow the list based on parameters like account type or business type.

Viewing All Accounts via API

All interactions with the Fondy API are done through the Encrypted Endpoint. To retrieve a complete list of all existing accounts, follow the API integration steps below:

  1. Encrypt the Request

    • Generate an AES Key:

       KeyGenerator keyGen = KeyGenerator.getInstance("AES");
      keyGen.init(128);
      SecretKey aesKey = keyGen.generateKey();
    • Encrypt the AES Key with Fondy's RSA Public Key:

       Cipher rsaCipher = Cipher.getInstance("RSA");
      rsaCipher.init(Cipher.ENCRYPT_MODE, fondyPublicKey);
      byte[] encryptedAESKey = rsaCipher.doFinal(aesKey.getEncoded());
      String base64EncryptedAESKey = Base64.getEncoder().encodeToString(encryptedAESKey);
    • Encrypt the JSON Payload Using the AES Key:

       Cipher aesCipher = Cipher.getInstance("AES");
      aesCipher.init(Cipher.ENCRYPT_MODE, aesKey);
      byte[] encryptedPayload = aesCipher.doFinal(payload.getBytes());
      String base64EncryptedPayload = Base64.getEncoder().encodeToString(encryptedPayload);
    • Combine the Encrypted Components:

       String combined = base64EncryptedAESKey + "-----" + base64EncryptedPayload;
      String finalEncryptedRequest = Base64.getEncoder().encodeToString(combined.getBytes());
  2. Sign the Request

     String stringToSign = encObject.encrypted_url + encObject.method + encObject.encrypted_payload + encObject.encrypted_user;

    Signature sig = Signature.getInstance("SHA256WithRSA");
    sig.initSign(getPrivateKey());
    sig.update(stringToSign.getBytes());
    byte[] signature = sig.sign();

    return Base64.getEncoder().encodeToString(signature);
  3. Send the Request

    • Endpoint to encrypt: /clientapi/encrypted/v1/{clientRef}
    • Method: POST
  WebClient webClient = WebClient.create("https://api.fondyflow.io");
EncryptedObject encryptedRequest = buildEncryptedRequest(payload, url, "POST", user);

EncryptedObject response = webClient.post()
.url("/clientapi/encrypted/v1/{clientRef}")
.contentType(MediaType.APPLICATION_JSON)
.body(Mono.just(encryptedRequest), EncryptedObject.class)
.retrieve()
.bodyToMono(EncryptedObject.class)
.block();
  1. Decrypt the Response
private static String decodeString(String encryptedPayload) throws Exception {
String decoded = new String(Base64.getDecoder().decode(encryptedPayload));
String[] parts = decoded.split(DELIMITER);
byte[] rsaEncryptedAESKey = Base64.getDecoder().decode(parts[0]);
byte[] aesEncryptedPayload = Base64.getDecoder().decode(parts[1]);

Cipher rsaCipher = Cipher.getInstance("RSA");
rsaCipher.init(Cipher.DECRYPT_MODE, getPrivateKey());
byte[] aesKeyBytes = rsaCipher.doFinal(rsaEncryptedAESKey);
SecretKeySpec aesKey = new SecretKeySpec(aesKeyBytes, "AES");

Cipher aesCipher = Cipher.getInstance("AES");
aesCipher.init(Cipher.DECRYPT_MODE, aesKey);
byte[] decryptedBytes = aesCipher.doFinal(aesEncryptedPayload);

return new String(decryptedBytes);
}