---
description: >-
  In this section, you'll find easy-to-use callbacks for managing player
  transactions, which can be integrated into your other scripts for enhanced
  functionality.
---

# Callbacks

***

### <mark style="color:blue;">`GetTransactions`</mark>

**Description:**\
Retrieve a list of all transactions associated with a player.

**Usage:**

```lua
local transactions = lib.callback.await("cloud-banking:server:GetTransactions", false)
```

**Returns:**

* **Array of Transactions**: Each transaction includes:
  * `id` - Unique Transaction ID
  * `type` - Type of Transaction (e.g., "deposit", "withdraw")
  * `date` - Date of Transaction
  * `time` - Time of Transaction
  * `amount` - Amount Transferred
  * `sender` - Name of the Sender
  * `receiver` - Name of the Receiver

***

### <mark style="color:blue;">`StoreTransaction`</mark>

**Description:**\
Stores a new transaction record in the database.

**Usage:**

```lua
lib.callback.await("cloud-banking:server:StoreTransaction", false, transactionAmount, transactionType, receiverId)
```

**Parameters:**

* `transactionAmount` - The amount of the transaction.
* `transactionType` - The type of transaction (e.g., "Deposit", "Withdrawal").
* `receiverId?` - The ID of the transaction receiver (leave empty if not applicable).
