# Deposits

#### Get all deposits

## Get all deposits

<mark style="color:blue;">`GET`</mark> `{base url}/v1/deposits`

Get all deposits

#### Query Parameters

| Name    | Type   | Description |
| ------- | ------ | ----------- |
| page    | number |             |
| perPage | number |             |

{% tabs %}
{% tab title="200: OK Deposits fetched successfully " %}

```typescriptreact
{
  "responseCode": "00",
  "status": "success",
  "message": "Deposits fetch successful",
  "data": [ 
      {
          "id": "844e2eaa-61a1-4099-8407-55a4b24df294",
          "organizationId": "a5f38f16-6c44-408f-b7ff-6775f02b83ac",
          "depositProductId": "aeec33a0-059f-4a4a-b122-357eec1572c2",
          "accountNumber": "0000000692",
          "accountName": "new depo 34",
          "accountHolder": "05768940-15ed-450c-8d8e-70f36ffffff8",
          "accountHolderType": "companies",
          "depositTenure": null,
          "accruedInterest": 0,
          "customData": {},
          "accountBalance": 19000,
          "accountLedgerBalance": 19000,
          "maturityDate": null,
          "status": "active",
          "updated_at": "2023-12-12T00:01:02.256Z",
          "firstName": null,
          "lastName": null,
          "clientkey": null,
          "name": "chowDeck",
          "accountholdername": "chowDeck",
          "companykey": "05768940-15ed-450c-8d8e-70f36ffffff8",
          "productName": "new product 1000",
          "productType": "savings_account"
      },
      {
          "id": "4fd1318b-668b-4562-a216-cd2490fd03ed",
          "organizationId": "a5f38f16-6c44-408f-b7ff-6775f02b83ac",
          "depositProductId": "aeec33a0-059f-4a4a-b122-357eec1572c2",
          "accountNumber": "0000000678",
          "accountName": "testing34567",
          "accountHolder": "05768940-15ed-450c-8d8e-70f36ffffff8",
          "accountHolderType": "companies",
          "depositTenure": null,
          "accruedInterest": 0,
          "customData": {},
          "accountBalance": 8500,
          "accountLedgerBalance": 8500,
          "maturityDate": null,
          "status": "active",
          "updated_at": "2023-12-12T00:01:02.272Z",
          "firstName": null,
          "lastName": null,
          "clientkey": null,
          "name": "chowDeck",
          "accountholdername": "chowDeck",
          "companykey": "05768940-15ed-450c-8d8e-70f36ffffff8",
          "productName": "new product 1000",
          "productType": "savings_account"
      },
      {
          "id": "bfca1acb-23e0-4ad4-a163-ed4481ed6d7e",
          "organizationId": "a5f38f16-6c44-408f-b7ff-6775f02b83ac",
          "depositProductId": "aeec33a0-059f-4a4a-b122-357eec1572c2",
          "accountNumber": "0000000465",
          "accountName": "sdsdsds",
          "accountHolder": "05768940-15ed-450c-8d8e-70f36ffffff8",
          "accountHolderType": "companies",
          "depositTenure": null,
          "accruedInterest": 0,
          "customData": {},
          "accountBalance": 1000,
          "accountLedgerBalance": 1000,
          "maturityDate": null,
          "status": "closed",
          "updated_at": "2023-09-04T08:36:32.009Z",
          "firstName": null,
          "lastName": null,
          "clientkey": null,
          "name": "chowDeck",
          "accountholdername": "chowDeck",
          "companykey": "05768940-15ed-450c-8d8e-70f36ffffff8",
          "productName": "new product 1000",
          "productType": "savings_account"
      }
  ],
  "pagination": {
      "currentPage": 1,
      "perPage": 30,
      "totalCount": 52,
      "totalPages": 2,
      "previousPage": 0,
      "nextPage": 2
  }
}
```

{% endtab %}

{% tab title="403: Forbidden Unauthorised " %}

```
{
    "message": "unauthorized",
    "code": 92
}
```

{% endtab %}
{% endtabs %}

#### Get deposit details

## Get deposit details

<mark style="color:blue;">`GET`</mark> `{base url}/v1/deposits/_single`

Get single deposit details

#### Query Parameters

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| depositId<mark style="color:red;">\*</mark> | string |             |

{% tabs %}
{% tab title="200: OK Deposit detail fetched successfully " %}

{% endtab %}

{% tab title="403: Forbidden Unauthorised " %}

```
{
    "message": "unauthorized",
    "code": 92
}
```

{% endtab %}
{% endtabs %}

#### Get deposit account balances

## Get deposit account balances

<mark style="color:blue;">`GET`</mark> `{base url}/v1/deposits/{depositId}/balances`

Get deposit account balances

{% tabs %}
{% tab title="200: OK Deposit account balances fetched successfully " %}

```json
{
    "responseCode": "00",
    "status": "success",
    "message": "Deposits balances fetch successful",
    "data": {
        "ledger balance": 8500,
        "available balance": 8500
    }
}
```

{% endtab %}

{% tab title="403: Forbidden Unauthorised " %}

```
{
    "message": "unauthorized",
    "code": 92
}
```

{% endtab %}
{% endtabs %}

#### Get deposit transactions

## Get deposit transactions

<mark style="color:blue;">`GET`</mark> `{base url}/v1/deposits/transactions`

Get all deposit transactions

#### Query Parameters

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| accountNumber<mark style="color:red;">\*</mark> | string |             |

{% tabs %}
{% tab title="200: OK deposit transactions fetched successfully " %}

```
{
    "status": "success",
    "message": "Transactions fetched successfully",
    "data": [],
    "pagination": {
        "currentPage": 1,
        "perPage": 15,
        "totalCount": 0,
        "totalPages": 0,
        "previousPage": 0,
        "nextPage": 0
    }
}
```

{% endtab %}

{% tab title="403: Forbidden Unauthorised " %}

```
{
    "message": "unauthorized",
    "code": 92
}
```

{% endtab %}
{% endtabs %}

#### Add deposits

## Add new deposit

<mark style="color:green;">`POST`</mark> `{base url}/v1/deposits/transactions`

Add new deposit

#### Request Body

| Name                                             | Type    | Description        |
| ------------------------------------------------ | ------- | ------------------ |
| productId<mark style="color:red;">\*</mark>      | string  | deposit product Id |
| accountNumber<mark style="color:red;">\*</mark>  | string  | account number     |
| type<mark style="color:red;">\*</mark>           | string  | type               |
| amount<mark style="color:red;">\*</mark>         | number  | amount (major)     |
| narration<mark style="color:red;">\*</mark>      | string  | narration          |
| applyManualFee<mark style="color:red;">\*</mark> | boolean | apply manual fees  |
| exemptAutoFees<mark style="color:red;">\*</mark> | boolean | exempt auto fees   |
| manualFee                                        | object  | manual fees        |

{% tabs %}
{% tab title="201: Created Deposit added successfully" %}

```
{
    "responseCode": "00",
    "message": "deposit added successfully"
}
```

{% endtab %}

{% tab title="403: Forbidden Unauthorised " %}

```
{
    "message": "unauthorized",
    "code": 92
}
```

{% endtab %}
{% endtabs %}

#### Deposit withdrawal

## Deposit withdrawal

<mark style="color:green;">`POST`</mark> `{base url}/v1/deposits/transactions`

Deposit withdrawal

#### Request Body

| Name                                             | Type    | Description         |
| ------------------------------------------------ | ------- | ------------------- |
| productId<mark style="color:red;">\*</mark>      | string  | depositt product id |
| accountNumber<mark style="color:red;">\*</mark>  | string  | account number      |
| type<mark style="color:red;">\*</mark>           | string  | type                |
| amount<mark style="color:red;">\*</mark>         | number  | amount (major)      |
| narration<mark style="color:red;">\*</mark>      | string  | narration           |
| applyManualFee<mark style="color:red;">\*</mark> | boolean | apply manual fees   |
| exemptAutoFees<mark style="color:red;">\*</mark> | boolean | exempt auto fees    |
| manualFee                                        | object  | manual fees         |

{% tabs %}
{% tab title="200: OK Deposit withdrawal successful" %}

```
{
    "responseCode": "00",
    "message": "deposit withdrawal successful"
}
```

{% endtab %}

{% tab title="403: Forbidden Unauthorised " %}

```
{
    "message": "unauthorized",
    "code": 92
}
```

{% endtab %}
{% endtabs %}

#### Deposit transfer

## Deposit transfer

<mark style="color:green;">`POST`</mark> `{base url}/v1/deposits/transactions/transfer`

Deposit transfer

#### Request Body

<table><thead><tr><th width="243">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>productId<mark style="color:red;">*</mark></td><td>string</td><td>deposit product Id</td></tr><tr><td>senderAccountNumber<mark style="color:red;">*</mark></td><td>string</td><td>sender account number</td></tr><tr><td>receiverAccountNumber<mark style="color:red;">*</mark></td><td>string</td><td>receiver account number</td></tr><tr><td>amount<mark style="color:red;">*</mark></td><td>number</td><td>amount (major)</td></tr><tr><td>narration<mark style="color:red;">*</mark></td><td>string</td><td>narration</td></tr><tr><td>applyManualFee<mark style="color:red;">*</mark></td><td>boolean</td><td>apply manual fees</td></tr><tr><td>exemptAutoFees<mark style="color:red;">*</mark></td><td>boolean</td><td>exempt auto fees</td></tr></tbody></table>

{% tabs %}
{% tab title="200: OK Deposit transfer successful" %}

```
{
    "responseCode": "00",
    "message": "deposit transfer successful"
}
```

{% endtab %}

{% tab title="403: Forbidden Unauthorised " %}

```
{
    "message": "unauthorized",
    "code": 92
}
```

{% endtab %}
{% endtabs %}

#### create deposit

## Create deposit

<mark style="color:green;">`POST`</mark> `{base url}/v1/deposits`

create deposit

**Headers**

<table><thead><tr><th width="302">Name</th><th width="156">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>Authorization header</code><mark style="color:red;">*</mark></td><td><code>String</code></td><td><code>API user secret key</code></td></tr></tbody></table>

**Body**

<table><thead><tr><th width="241">Name</th><th width="134">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>depositProductId</code><mark style="color:red;"><code>*</code></mark></td><td>string</td><td>deposit product Id</td></tr><tr><td><code>accountName</code> <mark style="color:red;">*</mark></td><td>string</td><td>deposit account name</td></tr><tr><td><code>accountHolder</code> <mark style="color:red;">*</mark></td><td>string</td><td>account holder Id</td></tr><tr><td><code>accountHolderType</code> <mark style="color:red;">*</mark></td><td>string</td><td>account holder type (clients/deposits)</td></tr><tr><td>depositTenure</td><td>string</td><td>deposit tenure</td></tr><tr><td><code>depositInterestRate</code></td><td>number</td><td>deposit interest rate</td></tr><tr><td>status</td><td>string</td><td>deposit status</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200: OK Deposit created successfully" %}

```json
{
    "responseCode": "00",
    "status": "success",
    "message": "Deposit created successfully",
    "data": {
        "organizationId": "aee1a803-3835-4195-b732-a19f7c3702c8",
        "accountHolderType": "clients",
        "accountHolder": "d4c9f36f-ffbb-4c85-87cb-97c8fee6b9ad",
        "accountName": "testing",
        "depositTenure": 24,
        "accountNumber": "0000000396",
        "depositInterestRate": 0,
        "status": "active",
        "customData": {},
        "depositProduct": {
            "id": "cc795c3d-1eb1-4099-b46f-0f25e121bd74",
            "organizationId": "aee1a803-3835-4195-b732-a19f7c3702c8",
            "productName": "march 8",
            "productType": "current_account",
            "productUserType": [
                "clients",
                "companies"
            ],
            "productCurrency": "NGN",
            "productDescription": "nil",
            "productInterestRate": {
                "applyInterest": false
            },
            "productTransactionSettings": {
                "minBalance": 1000,
                "dormantPeriod": 0,
                "allowAccountGoDormant": false
            },
            "productTenure": {},
            "productAccounting": {
                "feeIncome": "",
                "taxesPayable": "",
                "savingsControl": "5056806598",
                "interestExpense": "1014973771",
                "interestPayable": "5056806598",
                "transactionSource": "4043554117"
            },
            "branch": [
                "all_branches"
            ],
            "isActive": true,
            "status": "active",
            "created_at": "2024-03-08T09:07:35.695Z",
            "updated_at": "2024-03-13T08:49:00.960Z",
            "depositProductFees": [
                {
                    "id": "62847dc7-b840-49dd-b0a0-b265e0f69a3f",
                    "depositProductId": "cc795c3d-1eb1-4099-b46f-0f25e121bd74",
                    "fees": [
                        {
                            "value": 75,
                            "feeName": "deposit fee",
                            "feeType": "auto_per_all_deposit_transactions",
                            "feePayment": "FLAT"
                        }
                    ],
                    "created_at": "2024-03-08T09:07:35.695Z",
                    "updated_at": "2024-03-13T08:49:00.960Z"
                }
            ]
        },
        "maturityDate": null,
        "dormantDate": null,
        "id": "97706735-54d3-4f24-ab53-a5a92e17d931",
        "accountBalance": 0,
        "accountLedgerBalance": 0,
        "accruedInterest": 0,
        "created_at": "2024-04-02T09:27:27.960Z",
        "updated_at": "2024-04-02T09:27:27.960Z"
    }
}
```

{% endtab %}

{% tab title="400: Unauthorised " %}

```json
{
    "message": "No authorization token found",
    "code": 90
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample request" %}

```
   { 
    "depositProductId": "cc795c3d-1eb1-4099-b46f-0f25e121bd74",
    "accountName": "testing",
    "accountHolder": "d4c9f36f-ffbb-4c85-87cb-97c8fee6b9ad",
    "accountHolderType": "clients",
    "depositTenure": "24",
    "depositInterestRate": 0,
    "status": "active"
}
```

{% endtab %}

{% tab title="Sample response" %}

```
{
    "responseCode": "00",
    "status": "success",
    "message": "Deposit created successfully",
    "data": {
        "organizationId": "aee1a803-3835-4195-b732-a19f7c3702c8",
        "accountHolderType": "clients",
        "accountHolder": "d4c9f36f-ffbb-4c85-87cb-97c8fee6b9ad",
        "accountName": "testing",
        "depositTenure": 24,
        "accountNumber": "0000000396",
        "depositInterestRate": 0,
        "status": "active",
        "customData": {},
        "depositProduct": {
            "id": "cc795c3d-1eb1-4099-b46f-0f25e121bd74",
            "organizationId": "aee1a803-3835-4195-b732-a19f7c3702c8",
            "productName": "march 8",
            "productType": "current_account",
            "productUserType": [
                "clients",
                "companies"
            ],
            "productCurrency": "NGN",
            "productDescription": "nil",
            "productInterestRate": {
                "applyInterest": false
            },
            "productTransactionSettings": {
                "minBalance": 1000,
                "dormantPeriod": 0,
                "allowAccountGoDormant": false
            },
            "productTenure": {},
            "productAccounting": {
                "feeIncome": "",
                "taxesPayable": "",
                "savingsControl": "5056806598",
                "interestExpense": "1014973771",
                "interestPayable": "5056806598",
                "transactionSource": "4043554117"
            },
            "branch": [
                "all_branches"
            ],
            "isActive": true,
            "status": "active",
            "created_at": "2024-03-08T09:07:35.695Z",
            "updated_at": "2024-03-13T08:49:00.960Z",
            "depositProductFees": [
                {
                    "id": "62847dc7-b840-49dd-b0a0-b265e0f69a3f",
                    "depositProductId": "cc795c3d-1eb1-4099-b46f-0f25e121bd74",
                    "fees": [
                        {
                            "value": 75,
                            "feeName": "deposit fee",
                            "feeType": "auto_per_all_deposit_transactions",
                            "feePayment": "FLAT"
                        }
                    ],
                    "created_at": "2024-03-08T09:07:35.695Z",
                    "updated_at": "2024-03-13T08:49:00.960Z"
                }
            ]
        },
        "maturityDate": null,
        "dormantDate": null,
        "id": "97706735-54d3-4f24-ab53-a5a92e17d931",
        "accountBalance": 0,
        "accountLedgerBalance": 0,
        "accruedInterest": 0,
        "created_at": "2024-04-02T09:27:27.960Z",
        "updated_at": "2024-04-02T09:27:27.960Z"
    }
}
```

{% endtab %}
{% endtabs %}

#### Pre liquidate account

## Pre liquidate account

<mark style="color:green;">`POST`</mark> `{base url}/v1/deposits/{depositId}/pre_liquidate`

pre liquidate account

**Headers**

<table><thead><tr><th width="302">Name</th><th width="156">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>Authorization header</code><mark style="color:red;">*</mark></td><td><code>String</code></td><td><code>API user secret key</code></td></tr></tbody></table>

**Body**

| Name                                                  | Type   | Description        |
| ----------------------------------------------------- | ------ | ------------------ |
| `newAccountNumber` <mark style="color:red;">\*</mark> | string | new account number |

**Response**

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

```json
```

{% endtab %}

{% tab title="400: unauthorised " %}

```json
{
    "message": "No authorization token found",
    "code": 90
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample request" %}

```
{
    "newAccountNumber": "0000000098"
}
```

{% endtab %}

{% tab title="Sample response" %}

```
```

{% endtab %}
{% endtabs %}

#### liquidate account

## Liquidate account

<mark style="color:green;">`POST`</mark> `{base url}/v1/deposits/{depositId}/liquidate`

Liquidate account

**Headers**

<table><thead><tr><th width="302">Name</th><th width="156">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>Authorization header</code><mark style="color:red;">*</mark></td><td><code>String</code></td><td><code>API user secret key</code></td></tr></tbody></table>

**Body**

| Name                                                  | Type   | Description        |
| ----------------------------------------------------- | ------ | ------------------ |
| `newAccountNumber` <mark style="color:red;">\*</mark> | string | new account number |

**Response**

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

```json
```

{% endtab %}

{% tab title="400: unauthorised" %}

```json
{
    "message": "No authorization token found",
    "code": 90
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample request" %}

```
{
    "newAccountNumber": "0000002777"
}
```

{% endtab %}

{% tab title="Sample response" %}

```
```

{% endtab %}
{% endtabs %}

#### apply accrued interest

## Apply accrued interest

<mark style="color:green;">`POST`</mark> `{base url}/v1/deposits/{accountNumber}/apply_interest`

apply accrued interest

**Headers**

<table><thead><tr><th width="302">Name</th><th width="156">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>Authorization header</code><mark style="color:red;">*</mark></td><td><code>String</code></td><td><code>API user secret key</code></td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200: OK operation successful" %}

```json
{
    "responseCode": "00",
    "status": "success",
    "message": "operation successful"
}
```

{% endtab %}

{% tab title="400: unauthorised " %}

```json
{
    "message": "No authorization token found",
    "code": 90
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample response" %}

```
{
    "responseCode": "00",
    "status": "success",
    "message": "operation successful"
}
```

{% endtab %}
{% endtabs %}
