Finance API quick reference
===========================

The maintained documentation is in plugin.md. It contains the current Twig
variables, Payments integration, installation requirements, and PHP API details.

Legacy functions retained for compatible extensions:

- finance_check_money($userlogin, $balance_no = -1)
  Returns balance in minor currency units. Balance 0 is the main monetary
  balance; -1 returns the combined monetary balance.
- finance_check_enough_money($userlogin, $type, $tprice, $price)
  Checks whether a user can cover the requested point or monetary payment.
- finance_get_balance_type($balance_no)
  Returns the configured type for a non-monetary additional balance.
- finance_pay($identity, $payment)
  Debits a user balance and records the operation. Monetary amounts in
  $payment['value']['money'] are in minor currency units.
- finance_add_money($userlogin, $balance, $sum, $description = '')
  Credits a balance. $sum is expressed in major currency units with at most
  two decimal places. Use balance 0 for the main monetary balance.

For new balance top-up providers, integrate through the payments plugin rather
than the legacy Finance_Acceptor API.
