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

# 資金移動

> 查詢餘額並將資金存入你的 Fluz 現金餘額。

```javascript theme={null}
import { GraphQLClient, gql } from 'graphql-request';
import crypto from 'crypto';

const API_URL = 'https://transactional-graph.staging.fluzapp.com/api/v1/graphql';
const MIN_DEPOSIT_AMOUNT = 100;

async function deposit(userToken) {
  const client = new GraphQLClient(API_URL, {
    headers: {
      Authorization: `Bearer ${userToken}`,
      'Content-Type': 'application/json',
    },
  });

  const DEPOSIT = gql`
    mutation depositCashBalance($input: DepositCashBalanceInput!) {
      depositCashBalance(input: $input) {
        cashBalanceDeposits {
          cashBalanceDepositId
          status
        }
      }
    }
  `;

  const input = {
    idempotencyKey: crypto.randomUUID(),
    amount: 100,
    depositType: 'CASH_BALANCE',
    bankAccountId: '<<BANK_ACCOUNT_ID>>',
  };

  const res = await client.request(DEPOSIT, { input });
  return res.depositCashBalance;
}
```

需要 `MAKE_DEPOSIT` 權限範圍。

相關內容：[入金](/solutions/pay-ins).
