# Banking App

## Overview

The Banking App is a **free addon** provided by [TGG Banking](https://teamsgg.dev/scripts/banking) that integrates seamlessly with the [YSeries](https://teamsgg.dev/scripts/yseries) phone resource. This app allows players to manage their bank accounts directly from their phone, including viewing account balances, transaction history, transferring funds, and managing multiple account types.

## Requirements

### Required Resource

The Banking App **requires** the **tgg-banking** resource to be installed and running on your server. Without this resource, the Banking App will display an unavailable message and will not function.

* **Minimum Version**: tgg-banking v1.2.3+
* **Resource Link**: [Get TGG Banking](https://teamsgg.dev/scripts/banking)

#### Resource Detection

The Banking App automatically detects when the tgg-banking resource starts or stops, updating its availability in real-time. If the resource is stopped, the app will show an unavailable screen. When the resource starts again, the app will automatically become available.

![Unavailable Screen](https://r2.fivemanage.com/image/RVRgosj6ouf9.png)

## Features

* **Account Management**: View all bank accounts (Personal, Business, Shared, Savings)
* **Transaction History**: Browse transaction history with pagination and infinite scroll
* **Money Transfers**: Transfer funds between accounts with validation
* **Account Details**: View detailed account information including IBAN, balance, and account type
* **Savings Accounts**: Special handling for savings accounts with maturity dates and interest information
* **Account Refresh**: Manual refresh button to update account balances and transactions
* **Multiple Account Types**: Support for personal, business, shared, and savings accounts
* **Managing Loan Accounts**: Support for loan accounts with repayment schedules and interest rates
* **Managing Savings accounts**: Support for savings accounts with maturity dates and interest information

### User Interface

The Banking App features a clean, modern interface with:

* **Accounts Tab**: Browse all available accounts with balance overview

![Accounts Dashboard](https://r2.fivemanage.com/image/lLcWQemdlFUp.png)

* **Transfer Tab**: Transfer money between accounts

![Transfer Screen](https://r2.fivemanage.com/image/QAnv10gqmK01.png)

* **Account Details**: Tap any account to view detailed information and transaction history

![Account Details](https://r2.fivemanage.com/image/9fkNQ8bs627H.png)

* **Refresh Button**: Manually refresh account data from the header
* **Responsive Design**: Works seamlessly on all YSeries phone models

## Troubleshooting

If the Banking App shows as unavailable:

1. Verify tgg-banking resource is installed and started
2. Check server console for any dependency errors
3. Ensure tgg-banking version meets minimum requirements (v1.2.3+)
4. Ensure yseries is updated to the latest version
5. Restart both yseries and tgg-banking resources if issues persist

If transactions are not loading:

1. Verify the tgg-banking resource is running
2. Check that accounts exist in tgg-banking
3. Ensure the player has proper permissions for the account
4. Check server console for any error messages related to transaction retrieval

***

## Alternative: YPay Application

If you're using a different banking system, you can use the **YPay** application instead. YPay uses **framework functions only** and does not require any banking integration. It works seamlessly with any framework (QBCore, ESX, QBox, or Standalone) that provides standard account management functions.

### How YPay Works

YPay uses the framework abstraction layer (`Framework.GetPlayerFromId()`, `getAccount()`, `addAccountMoney()`, `removeAccountMoney()`) to interact with player bank accounts. This means:

* ✅ **No banking integration required** - YPay works with any framework out of the box
* ✅ **No tgg-banking dependency** - YPay operates independently
* ✅ **Framework-agnostic** - Works with QBCore, ESX, QBox, or Standalone frameworks

YPay automatically uses your framework's built-in account management system, so no additional configuration or integration files are needed.

***

⚠️ **Note**: The Banking App is provided free of charge as an addon for tgg-banking users. It exclusively supports tgg-banking and will not work with other banking systems.
