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

# Deposit From External Accounts

depositCashBalance

When you're ready to move money into your Fluz account, you can deposit funds into the following three balances:

1. **Cash balance**- A regular cash balance deposit.
2. **Gift card balance**- A non-withdrawable deposit for gift card balance.
3. **Reserve balance** - A deposit held in reserve balance.

# Make a Deposit

To deposit funds into one of your Fluz balances, use the `depositCashBalance` [mutation](https://storage.googleapis.com/fluz-public-docs/api-reference.html#mutation-depositCashBalance). This mutation accepts an input object type of `DepositCashBalanceInput`, which allows you to specify the following details:

1. **Amount:** **Required** - The amount you wish to deposit.
2. **idempotencyKey:**  **Required** - A unique client-generated UUID to ensure a request is processed only once.
3. **Funding Source:** The payment method from which the deposit will be made (e.g., bank account, credit or debit card, PayPal). In order to get your funding source's ID, use the `getWallet` [query](https://storage.googleapis.com/fluz-public-docs/api-reference.html#query-getWallet).
   1. **`bankAccountId`** - If you want to pay with a bank account, define the bank account ID in the `depositCashBalance` mutation.
   2. **`bankCardId`** - If you want to pay with a bank card, define the bank card ID in the `depositCashBalance` mutation.
   3. **`paypalVaultID`** - If you want to pay with a PayPal account, define the PayPal account ID in the `depositCashBalance` mutation.
4. **Deposit Destination:** The balance where you want to deposit your funds. The available options for this are defined in the `CashBalanceDepositType` enumerator:
   1. **`CASH_BALANCE`**
   2. **`GIFT_CARD_BALANCE`**
   3. **`RESERVE_BALANCE`**
5. **Merchant Category Code:** Only applies for **GIFT\_CARD\_BALANCE**. A four-digit number that classifies a business by the type of products or services it offers. Use `getMccList` to retrieve a list of valid MCCs.
6. **`userCashBalanceId`** - If `CASH_BALANCE`is selected, you can specify the cash balance (spend account) to deposit your funds
7. *`memo`*\* - If you want to attach a note to this transaction, provide a free-text memo here. Max 255 characters.
8. **`transactionCategory`** - If you want to categorize this transaction, provide a category name. Categories are created automatically on first use and reused if the same name is passed again.
9. **`attachmentId`** - If you want to attach a file to this transaction, provide the ID returned by the upload endpoint. See [Add Expense Details](/features/add-expense-details). 📘 See [Add Expense Details](/features/add-expense-details) for full details on uploading attachments and working with memos and categories.

## Sample Request

```graphql graphql theme={null}
mutation depositCashBalance($input: DepositCashBalanceInput!) {
  depositCashBalance(input: $input) {
    cashBalanceDeposits {
      ...CashBalanceDepositFragment
    }
    balances {
      ...UserBalancesFragment
    }
  }
}
```

## DepositCashBalanceInput

```json theme={null}
{
  "idempotencyKey": "0284be6f-1a69-44f7-9da0-5b5edaf45d19",
  "amount": 987.65,
  "depositType": "GIFT_CARD_BALANCE",
  "merchantCategoryCode": 1234,
  "bankAccountId": "0284be6f-1a69-44f7-9da0-5b5edaf45d19",
  "bankCardId": "0284be6f-1a69-44f7-9da0-5b5edaf45d19",
  "paypalVaultId": "0284be6f-1a69-44f7-9da0-5b5edaf45d19",
  "userCashBalanceId": "0347ade-2b69-55e6-4db0-5b5daddf45d22"
}
```

## Sample Response

```json theme={null}
{
  "data": {
    "depositCashBalance": {
      "cashBalanceDeposits": [
        {
          "cashBalanceDepositId": "5f5c5b5f-4c4b-4e4e-9e9e-4f4f4f4f4f4f",
          "depositDisplayId": "102370",
          "depositAmount": "100.00",
          "depositFee": "2.00",
          "bankAccountId": "b2c3d4e5-f6a7-890b-c12d-34ef5678gh90",
          "transactionDate": "2024-08-21T10:30:00Z",
          "clearedDate": "2024-08-22T12:00:00Z",
          "status": "COMPLETED",
          "expectedClearedDate": "2024-08-22T12:00:00Z",
          "cashBalanceDepositType": "CASH_BALANCE",
          "cashBalanceSettlements": [
            {
              "cashBalanceSettlementId": "255f8245-02c7-4817-901e-15fe265f6968",
              "cashBalanceDepositId": "255f8245-02c7-4817-901e-15fe265f6968",
              "availabilityType": "INSTANT",
              "status": "AVAILABLE"
            }
          ]
        }
      ],
      "balances": {
        "cashBalance": {
          "availableBalance": "25.00",
          "totalBalance": "25.00",
          "pendingBalance": "25.00",
          "lifetimeBalance": "25.00",
        },
        "rewardBalance": {
          "availableBalance": "25.00",
          "totalBalance": "25.00",
          "lifetimeBalance": "25.00",
        },
        "giftCardCashBalance": {
          "availableBalance": "25.00",
          "totalBalance": "25.00",
          "pendingBalance": "25.00",
          "lifetimeBalance": "25.00",
        }
      }
    }
  }
}
```

# Deposit Response

Once you initiate a deposit with the `depositCashBalance` [mutation](https://storage.googleapis.com/fluz-public-docs/api-reference.html#mutation-depositCashBalance), you will get a response providing details about the deposit.

| Field Name          | Type                  | Description                                                                                              |
| :------------------ | :-------------------- | :------------------------------------------------------------------------------------------------------- |
| cashBalanceDeposits | \[CashBalanceDeposit] | List of cash balance deposits made as part of the mutation.                                              |
| balances            | UserBalances          | The current balances for the user, including cash balance, rewards balance, and Fluz prepayment balance. |

The `CashBalanceDeposit` object will contain important information about the deposit you initiated.

| Field Name             | Type                      | Description                                                                                          |
| :--------------------- | :------------------------ | :--------------------------------------------------------------------------------------------------- |
| cashBalanceDepositId   | UUID!                     | Unique identifier for the cash balance deposit.                                                      |
| depositDisplayId       | String!                   | Display identifier for the deposit, intended for user-facing purposes.                               |
| depositAmount          | String!                   | The amount of the deposit.                                                                           |
| depositFee             | String                    | Fee associated with the deposit, if applicable.                                                      |
| bankCardId             | UUID                      | Identifier of the bank card used for the deposit.                                                    |
| bankAccountId          | UUID                      | Identifier of the bank account used for the deposit.                                                 |
| paypalVaultId          | UUID                      | Identifier of the PayPal vault used for the deposit.                                                 |
| transactionDate        | DateTime!                 | Date and time when the transaction was made.                                                         |
| clearedDate            | DateTime                  | Date and time when the deposit cleared, if applicable.                                               |
| status                 | CashBalanceDepositStatus! | Current status of the deposit.                                                                       |
| expectedClearedDate    | DateTime!                 | Expected date and time for the deposit to clear.                                                     |
| cashBalanceDepositType | CashBalanceDepositType!   | Type of the cash balance deposit, including `CASH_BALANCE`,`GIFT_CARD_PREPAYMENT`,`RESERVE_BALANCE`. |
| cashBalanceSettlements | \[CashBalanceSettlement]  | Settlement time details for the deposit, including status and type.                                  |

> 📘 Please note
>
> Deposits may settle instantly or within 2-5 business days. To learn how settlement times are calculated, [read this article.](https://help.fluz.app/en/articles/5773275-instant-access)

<br />

<StickyContactSalesBanner />
