Server side

🎯 Types

IAccount

---@class IAccount
---@field id string
---@field balance number
---@field createdAt number
---@field iban number
---@field name string
---@field ownerId string
---@field type string
---@field color string
---@field ownedAccount boolean
---@field frozen boolean
---@field closed boolean
---@field settings IAccountSettings
---@field permissions IAccountMemberPermissions

πŸ†” Accounts

GetSocietyAccount

GetAccountByIban

GetPersonalAccountByPlayerId

GetPersonalAccountByPlayerIdentifier

CreateBusinessAccount

πŸ’΅ Money

GetAccountMoneyByIban

GetSocietyAccountMoney

AddSocietyMoney

RemoveSocietyMoney

Feel free to request an export to suit your needs.

πŸͺ΅ Misc

AddTransaction

Example: Withdraw transaction
  • When adding a withdrawal transaction, the first parameter(toIban) is not required and must be skipped.

Example: Deposit transaction
  • When adding a deposit transaction, the second parameter(fromIban) is unnecessary and must be skipped.

Example: Custom transaction
  • You can register a custom transaction to match your needs.

IsAccountFrozen

IsAccountTerminated

FreezeAccount

UnfreezeAccount

TerminateAccount

IsCardFrozen

IsCardTerminated

FreezeCard

UnfreezeCard

πŸ’³ Loans

All loan exports require the loan system to be enabled in config.loans.lua. These exports can only be called from the server side.

GetCreditScore

Get the credit score for a player by their identifier.

Example

GetCreditProfile

Get detailed credit profile for a player including score factors and loan eligibility.

Returns:

CanPlayerFinance

Check if a player can finance (take a loan) for a specific amount.

Example

CreateLoan

Create a loan application with pending status (for manual approval workflows). Use ApproveLoan or RejectLoan to process the application.

Example

ApproveLoan

Approve a pending loan application and disburse funds to the player. Player must be online.

Example

RejectLoan

Reject a pending loan application.

Example

CreateAndApproveLoan

Create and immediately approve a loan, disbursing funds to the player. Player must be online.

Returns on success:

GetLoan

Get a specific loan by ID.

GetPlayerLoans

Get all loans for a player (including paid, defaulted, etc.).

GetActiveLoans

Get only active loans for a player (status: active or overdue).

GetLoanBalance

Get the remaining balance on a loan.

GetLoanPaymentDue

Get the next payment due information for a loan.

Returns:

IsLoanDelinquent

Check if a loan is delinquent (overdue or defaulted).

Example

ApplyLoanPayment

Apply a payment to a loan. Player must own the loan.

Example: Pay specific amount
Example: Pay regular installment

PayLoanDue

Pay the current due amount on a loan (convenience wrapper for ApplyLoanPayment).

GetPlayerDebtSummary

Get a comprehensive summary of all player debt.

Returns:

GetLoanHistory

Get payment history for a specific loan.

Returns array of:

Last updated