# Exports

### **Get Account, Add Money and Remove Money**

<pre class="language-lua"><code class="lang-lua"><strong>exports['okokBanking']:GetAccount(society)
</strong>exports['okokBanking']:AddMoney(society, value)
exports['okokBanking']:RemoveMoney(society, value)
</code></pre>

### **Add Transaction to Player Transaction History**

```lua
exports['okokBankingV2']:AddTransaction(citizenid, transactionData, source)
```

#### Variables:

**citizen\_id**: `The player's unique identifier - can be citizenid, job name, or account identifier`

```lua
transactionData: { 
      sender_identifier = "steam:110000123456789", -- senderIdentifier/senderCitizenid
      sender_name = "John Doe", 
      receiver_identifier = "bank", -- receiverIdentifier/receiverCitizenid
      receiver_name = "Bank", 
      value = 500, 
      type = "deposit", 
      reason = "ATM Deposit"
}         
```

**source**: `source` (Optional - The player's server source ID for webhook purposes)

### **Get Player Transaction History**

```lua
exports['okokBankingV2']:GetPlayerTransactions(citizenid, limit)
```

#### Variables:

**citizen\_id**: `The player's unique identifier - can be citizenid, job name, or account identifier`

**limit:** `50` (Optional - Maximum number of transactions to return. If `nil`, returns all transactions. If `0` or negative, returns empty table)

**Example Usage:**

```lua
-- Get all transactions
local allTransactions = exports['okokBankingV2']:GetPlayerTransactions("steam:110000123456789")

-- Get last 10 transactions
local recentTransactions = exports['okokBankingV2']:GetPlayerTransactions("steam:110000123456789", 10)
```
