# Bank Account

your bank account that you will register on Moota to get mutations from several bank accounts at once in one dashboard, make sure you have an iBanking account from the account you have. Moota does not recognize the account from mBanking.

## List Of Bank Type

| **bank\_type**       | Bank Name                            |
| -------------------- | ------------------------------------ |
| bca                  | Bank Central Asia                    |
| bcaGiro              | BCA Giro                             |
| bcaSyariah           | Bank Central Asia Syariah            |
| bniBisnisSyariah     | Bank Negara Indonesia Bisnis Syariah |
| bniBisnis            | Bank Negara Indonesia Bisnis         |
| bniSyariah           | Bank Negara Indonesia Syariah        |
| bni                  | Bank Negara Indonesia                |
| bri                  | Bank Rakyat Indonesia                |
| briCms               | BRI CMS                              |
| briGiro              | Bank Rakyat Indonesia Giro           |
| briSyariah           | Bank Rakyat Indonesia Syariah        |
| briSyariahCms        | BRI Syariah CMS                      |
| bsi                  | Bank Syariah Indonesia               |
| bsiGiro              | Bank Syariah Indonesia Giro          |
| gojek                | GoPay                                |
| mandiriBisnis        | Mandiri Bisnis                       |
| mandiriMcm2          | Mandiri MCM 2                        |
| mandiriMcm           | Mandiri MCM                          |
| mandiriOnline        | Mandiri                              |
| mandiriSyariah       | Mandiri Syariah                      |
| mandiriSyariahBisnis | Mandiri Syariah Bisnis               |
| mandiriSyariahMcm    | Mandiri Syariah MCM                  |
| mayBank              | MayBank                              |
| megaSyariahCms       | Mega Syariah CMS                     |
| muamalat             | Muamalat                             |
| ovo                  | OVO                                  |

## Create Bank Accounts

## Create Bank Account

<mark style="color:green;">`POST`</mark> `https://app.moota.co/api/v2/bank/store`

#### Request Body

| Name            | Type    | Description                                                                            |
| --------------- | ------- | -------------------------------------------------------------------------------------- |
| is\_active      | boolean | Is active set true for activate bank account from Moota                                |
| account\_number | string  | Account Number must be same from ibanking number                                       |
| name\_holder    | string  | Name Holder must be same from ibanking account                                         |
| password        | string  | Password must be same from ibanking account                                            |
| username        | string  | Username must be same from your ibanking account                                       |
| bank\_type      | string  | Bank Type prefer with bank account can registered on Moota. choose from top this table |
| corporate\_id   | string  | Corporate Id only for bank corporate for non corporate bank leave blank it             |

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

```
{
  "status": true,
  "balance_before": 50000,
  "bank": {
    "corporate_id": "",
    "username": "moota",
    "atas_nama": "moota-co",
    "balance": "0.00",
    "account_number": "16899030",
    "bank_type": "bca",
    "login_retry": 0,
    "date_from": "2021-09-24 00:00:00",
    "date_to": "2021-09-24 00:00:00",
    "meta": null,
    "interval_refresh": 15,
    "next_queue": "2021-09-24 15:54:59",
    "is_active": true,
    "in_queue": 0,
    "in_progress": 0,
    "recurred_at": "2021-09-25 15:39:59",
    "created_at": "2021-09-24 15:39:59",
    "token": "1rNkD09kda6",
    "bank_id": "1rNkD09kda6",
    "label": "BCA",
    "last_update": "2021-09-24T08:24:59.000000Z"
  },
  "balance": 48500
}
```

{% endtab %}

{% tab title="422 " %}

```
{
  "message": "The given data was invalid.",
  "errors": {
    "bank_type": [
      "The selected bank type is invalid."
    ]
  }
}

```

{% endtab %}
{% endtabs %}

## Update Bank Account

The table given below describes the `/api/v2/bank/update/{bank_id}`.\
Use this API to update an existing beneficiary identified by its `bank_id`.<br>

## Update Bank Account

<mark style="color:green;">`POST`</mark> `https://app.moota.co/api/v2/bank/update/{bank_id}`

#### Path Parameters

| Name     | Type   | Description                       |
| -------- | ------ | --------------------------------- |
| bank\_id | string | Bank Id of identified target bank |

#### Request Body

| Name            | Type    | Description                                                                                      |
| --------------- | ------- | ------------------------------------------------------------------------------------------------ |
| bank\_type      | string  | Bank Type prefer with your ibanking choose from top this table                                   |
| password        | string  | Password must be same with your ibanking account                                                 |
| is\_active      | boolean | Is Active set true for activate bank account from Moota                                          |
| account\_number | string  | Account Number must be same with your ibanking account                                           |
| name\_holder    | string  | Name Holder must be same with your ibanking account                                              |
| username        | string  | Username must be same with your ibanking account for ( e-wallet account fill with number phone ) |
| corporate\_id   | string  | Corporate id only for bank corporate for non corporate bank leave blank it                       |

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

```
{
  "status": true,
  "balance_before": 50000,
  "bank": {
    "corporate_id": "",
    "username": "moota",
    "atas_nama": "moota-co",
    "balance": "0.00",
    "account_number": "16899030",
    "bank_type": "bca",
    "login_retry": 0,
    "date_from": "2021-09-24 00:00:00",
    "date_to": "2021-09-24 00:00:00",
    "meta": null,
    "interval_refresh": 15,
    "next_queue": "2021-09-24 15:54:59",
    "is_active": true,
    "in_queue": 0,
    "in_progress": 0,
    "recurred_at": "2021-09-25 15:39:59",
    "created_at": "2021-09-24 15:39:59",
    "token": "1rNkD09kda6",
    "bank_id": "1rNkD09kda6",
    "label": "BCA",
    "last_update": "2021-09-24T08:24:59.000000Z"
  },
  "balance": 48500
}

```

{% endtab %}

{% tab title="404 " %}

```
{
  "error": true,
  "message": "Data not found"
}
```

{% endtab %}

{% tab title="422 " %}

```
{
  "message": "The given data was invalid.",
  "errors": {
    "bank_type": [
      "The selected bank type is invalid."
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## Get List Bank Account

You can fetch all bank account with this endpoint `/api/v2/bank`.

## Fetch Bank Account

<mark style="color:blue;">`GET`</mark> `https://app.moota.co/api/v2/bank`

#### Query Parameters

| Name      | Type    | Description                      |
| --------- | ------- | -------------------------------- |
| page      | integer | Page number for pagination       |
| per\_page | integer | Per Page total page can you show |

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

```
{
  "current_page": 1,
  "data": [
    {
      "corporate_id": null,
      "username": "moota.co",
      "atas_nama": "Moota",
      "balance": "100123.00",
      "account_number": "235264741",
      "bank_type": "bca",
      "login_retry": 0,
      "date_from": "2021-09-24 00:00:00",
      "date_to": "2021-09-24 00:00:00",
      "meta": null,
      "interval_refresh": 15,
      "next_queue": "2021-09-24 11:16:57",
      "is_active": true,
      "in_queue": 0,
      "in_progress": 0,
      "recurred_at": "2021-09-25 11:01:57",
      "created_at": "2021-09-24 11:01:57",
      "token": "VLagzqBj42D",
      "bank_id": "VLagzqBj42D",
      "label": "BCA",
      "last_update": "2021-09-24T03:46:57.000000Z"
    },
    {
      "corporate_id": null,
      "username": "moota.co",
      "atas_nama": "Moota",
      "balance": "126987.00",
      "account_number": "0144050",
      "bank_type": "mandiriBisnis",
      "login_retry": 0,
      "date_from": "2021-09-24 00:00:00",
      "date_to": "2021-09-24 00:00:00",
      "meta": null,
      "interval_refresh": 15,
      "next_queue": "2021-09-24 11:16:57",
      "is_active": true,
      "in_queue": 0,
      "in_progress": 0,
      "recurred_at": "2021-09-25 11:01:57",
      "created_at": "2021-09-24 11:01:57",
      "token": "e42qjy2WGE5",
      "bank_id": "e42qjy2WGE5",
      "label": "Mandiri Bisnis",
      "last_update": "2021-09-24T03:46:57.000000Z"
    },
  ],
  "first_page_url": "https://app.moota.co/api/v2/bank?page=1",
  "from": 1,
  "last_page": 1,
  "last_page_url": "https://app.moota.co/api/v2/bank?page=1",
  "links": [
    {
      "url": null,
      "label": "Sebelumnya",
      "active": false
    },
    {
      "url": "https://app.moota.co/api/v2/bank?page=1",
      "label": "1",
      "active": true
    },
    {
      "url": null,
      "label": "Selanjutnya",
      "active": false
    }
  ],
  "next_page_url": null,
  "path": "https://app.moota.co/api/v2/bank",
  "per_page": 20,
  "prev_page_url": null,
  "to": 6,
  "total": 6
}
```

{% endtab %}
{% endtabs %}

## Need To Fast Getting Mutation From Ibanking

by default moota will pull mutations based on 15 minute intervals. if you want to pick up right now use this endpoint without having to wait 15 minutes later. and make sure your points are enough `/api/v2/bank/{bank_id}/refresh`

## Refresh Mutation

<mark style="color:green;">`POST`</mark> `https://app.moota.co/api/v2/bank/{bank_id}/refresh`

#### Path Parameters

| Name     | Type   | Description                                               |
| -------- | ------ | --------------------------------------------------------- |
| bank\_id | string | Bank Id from bank account identified can get new mutation |

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

```
{
  "message": "OK"
}
```

{% endtab %}

{% tab title="404 " %}

```
{
  "message": "Data not found"
}
```

{% endtab %}
{% endtabs %}

## Activate E-wallet Account

After add account e-wallet from moota and activate ewallet account `(gojek / ovo)` must be request otp code first and this example for activate ewallet account

The table given below describes the `/api/v2/bank/request/otp/{bank_id}`.

Use this API to update an existing beneficiary identified by its `bank_id`.

## Request Otp Code

<mark style="color:green;">`POST`</mark> `https://app.moota.co/api/v2/bank/request/otp/{bank_id}`

#### Path Parameters

| Name     | Type   | Description                         |
| -------- | ------ | ----------------------------------- |
| bank\_id | string | Bank Id of identiied target account |

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

```
{
  "status": true,
  "message": "Kode OTP sudah dikirimkan pada nomor 089666528074 "
}
```

{% endtab %}

{% tab title="404 " %}

```
{
  "error": true,
  "message": "Data not found"
}
```

{% endtab %}
{% endtabs %}

## **After get response otp code from number phone please verification otp code**

The table given below describes the `/api/v2/bank/verification/otp/{bank_id}`.

Use this API to update an existing beneficiary identified by its `bank_id`.

## Verification Otp Code

<mark style="color:green;">`POST`</mark> `https://app.moota.co/api/v2/bank/verification/otp/{bank_id}`

#### Path Parameters

| Name     | Type   | Description                       |
| -------- | ------ | --------------------------------- |
| bank\_id | string | Bank Id of identified target bank |

#### Request Body

| Name      | Type   | Description                    |
| --------- | ------ | ------------------------------ |
| otp\_code | number | Otp Code number of verificaton |

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

```
{
  "message": "OK"
}
```

{% endtab %}

{% tab title="404 " %}

```
{
  "message": "Data not found"
}
```

{% endtab %}
{% endtabs %}

## Remove Bank Account

The table given below describes the `/api/v2/bank/{bank_id}/destroy`.

Use this API to update an existing beneficiary identified by its `bank_id`.

## Remove&#x20;

<mark style="color:green;">`POST`</mark> `https://app.moota.co/api/v2/bank/{bank_id}/destroy`

#### Path Parameters

| Name     | Type   | Description                        |
| -------- | ------ | ---------------------------------- |
| bank\_id | string | Bank Id of target bank can destroy |

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

```
{
  "message": "OK"
}
```

{% endtab %}

{% tab title="404 " %}

```
{
  "message": "Data not found"
}
```

{% endtab %}
{% endtabs %}
