# Bank

**URL:** <https://hotbunny.dev/t/bank/49>\
**Category:** API Reference\
**Created:** [October 21, 2026, 4:01pm UTC](https://hotbunny.dev/t/bank/49 "2026-10-21T16:01:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteelWaffe7](https://hotbunny.dev/user_avatar/hotbunny.dev/steelwaffe7/32/11_2.png) [@SteelWaffe7](https://hotbunny.dev/u/SteelWaffe7)\
**Post date:** [October 21, 2026, 4:01pm UTC](https://hotbunny.dev/t/bank/49/1 "2026-10-21T16:01:59Z")

</div>

The `Bank` namespace provides access to the in-game banking system. Send money to the player, withdraw from their account, check balance, and read account details.

**Required permission:** `bank`

## Import

```typescript
import { Bank } from "@hotbunny/hackhub-content-sdk";

```

## Methods

### `Bank.transaction(options)`

Create a bank transaction (deposit money to the player’s account).

| Parameter | Type | Description |
| --- | --- | --- |
| `options.amount` | `number` | Amount to transfer |
| `options.description` | `string` | Transaction description shown in bank history |
| `options.from` | `{ IBAN: string; name: string }?` | Sender info (optional) |
| `options.to` | `string?` | Recipient IBAN (defaults to player) |

```typescript
Bank.transaction({
    amount: 5000,
    description: "Quest reward: Hack the Planet",
    from: {
        IBAN: "DE89370400440532013000",
        name: "Anonymous Employer",
    },
});

```

### `Bank.withdraw(options)`

Withdraw money from the player’s account (e.g. for purchases).

| Parameter | Type | Description |
| --- | --- | --- |
| `options.amount` | `number` | Amount to withdraw |
| `options.description` | `string` | Transaction description shown in bank history |
| `options.to` | `string?` | Recipient IBAN (defaults to `"MERCHANT"`) |

```typescript
Bank.withdraw({
    amount: 200,
    description: "Bought VPN subscription",
});

```

### `Bank.getPlayerAccount()`

Get the player’s bank account information.

**Returns:** `BankAccountInfo`

```typescript
const account = Bank.getPlayerAccount();
console.log(`IBAN: ${account.IBAN}`);
console.log(`Balance: $${account.balance}`);
console.log(`Owner: ${account.owner}`);

```

### `Bank.getBalance()`

Get the player’s current balance as a number.

**Returns:** `number`

```typescript
if (Bank.getBalance() >= 10000) {
    console.log("Player is rich!");
}

```

## Types

### `BankTransactionOptions`

```typescript
interface BankTransactionOptions {
    amount: number;
    description: string;
    from?: {
        IBAN: string;
        name: string;
    };
    to?: string;
}

```

### `BankAccountInfo`

```typescript
interface BankAccountInfo {
    id: string;
    IBAN: string;
    balance: number;
    owner: string;
}

```
