Skip to content

Accounts

Functions for working with a contact's account balance in a bot

{{ getBalance("Currency code") }} - Get contact balance

In rubles: {{ getBalance("RUB") }}

In dollars: {{ getBalance("USD") }}

{{ getCartAmount() }} – displays the total cost of items in the cart

Account system and withdrawals in a chat bot with a referral program

Create a full-fledged account system in a chat bot with top-up via YooKassa, automatic referral accruals, and convenient withdrawals. Learn how to work with the "getBalance" function to display balance in different currencies, set up a referral program with percentage accruals, integrate the YooKassa payment system, and two ways to implement withdrawals — through standard blocks and API requests (requests to the application programming interface).

Ready-made template for implementing the "Account management in Telegram bot | Accumulation and withdrawal of funds" project in one click:

Install template

Bonus for new users and the opportunity to get 500 rubles in points as a gift 🎁

  • Register on LEADTEX
  • Create and test your first project
  • Don't miss the special offer. Get a gift 👈