> For the complete documentation index, see [llms.txt](https://tgtaps.gitbook.io/tgtaps-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tgtaps.gitbook.io/tgtaps-docs/features/rates.md).

# Rates

## Content

* [What is rate?](#what-is-rate)
* [What are rates needed for?](#what-are-rates-needed-for)
* [How to sell rates?](#how-to-sell-rates)
* [How to control access to blocks?](#how-to-control-access-to-blocks)
* [How to control access to pages?](#how-to-control-access-to-pages)
* [Placeholder](#placeholder)
* [How to see user rate in CRM?](#how-to-see-user-rate-in-crm)
* [How to unsubscribe from rate?](#how-to-unsubscribe-from-rate)
* [How to invite and kick users from private groups?](#how-to-invite-and-kick-users-from-private-groups)

## What is rate?

Rate is a particular status that user can buy for points, stars or money (read more in payments section). For example, rates are: “Minimal”, “Standard” and “Premium”.

<figure><img src="/files/0g2e3CGpjJO87ymQV2fy" alt=""><figcaption></figcaption></figure>

## What are rates needed for?

Depending on the user rate you can:

* **Give access to your content** (for example, if you are selling courses or books).
* **Control access to pages** (for example, users with “Minimal” rate have access to first 10 lessons, users with “Premium” rate have access to all lessors and bonus materials).
* **Control visibility of blocks** (for example, show for premium users secret codes, materials, additional text, extra tasks, etc.).

## How to sell rates?

Rates can be sold in two ways:

* Via direct link in button, text, container, etc.\
  \
  To do this, create a link with the following content (replace placeholders):\
  `#buy-rate?rateName=RATE_NAME&description=PURCHASE_DESCRIPTION`\
  \
  Where:\
  \- `RATE_NAME`- is a name of the buying rate (spaces make sense);\
  \- `PURCHASE_DESCRIPTION` - the text will appear in invoices before the rate name.\
  \
  For example:\
  `#buy-rate?rateName=Minimal&description=Buy rate` \
  \
  Then, when the user clicks the URL, a dialog suggesting buying rate will appear:<br>

  <figure><img src="/files/JaJFvJcNoSgGGmydIJP0" alt=""><figcaption></figcaption></figure>

  <figure><img src="/files/Bgd2mVCnw6y8QF4hx8Sj" alt=""><figcaption></figcaption></figure>
* Via paid [page](/tgtaps-docs/features/pages.md).\
  \
  To do this, add allowed rates to the [paid page](/tgtaps-docs/features/pages/paid-pages.md):\
  ![](/files/zSyHfZ4upJ2p8xBNqjTm)\
  \
  Then, when user try to go to this page, the rate will be suggested to buy:\
  ![](/files/mTrufcTMr2kOp1Zc0uH8)

## How to control access to pages?

You can give access to [pages ](/tgtaps-docs/features/pages.md)for specified rates. To achieve this, select required rates in page configure section:

![](/files/vh0zp8fkAXXgOC0Cyrlj)

## How to control access to blocks?

You can show some blocks to particular rates (or to free users, all users, etc.):

<figure><img src="/files/coK5YBYVd4wzEAPFH7L1" alt=""><figcaption></figcaption></figure>

If the user is not in chosen rates, the block will be hidden.

## Placeholder

To show user rate name is UI, you can use a [placeholder ](/tgtaps-docs/features/placeholders.md)in text field `{user_rate}`:

<figure><img src="/files/MYllQPWKm9mnSeWNVr3p" alt=""><figcaption></figcaption></figure>

In UI, here will be inserted current user rate's name.

## How to see user rate in CRM?

The rate is visible in CRM when you choose user:

<figure><img src="/files/LYzGK2DjrAalnNbwI3Bd" alt=""><figcaption></figcaption></figure>

## How to unsubscribe from rate?

Subscriptions to rates are the same as subscription payments. [Please read there how to cancel subscriptions](/tgtaps-docs/features/payments.md#subscriptions).

## How to invite and kick users from private groups?

When users buy the rate, you can approve them to join private groups and channels. When the rate is expired, you can kick them from groups automatically.

<figure><img src="/files/u4IJR2Zey6R66hxGpF2G" alt=""><figcaption></figcaption></figure>

To do so, you need to:

1. Add bot to private group or private channel.

2. Mark the bot as an administrator.\
   You can see groups where your bot is present and is admin in this tab:<br>

   <figure><img src="/files/900wJonQocsgRVHiLTDw" alt=""><figcaption></figcaption></figure>

3. Select the group in rate groups dropdown.

4. **Generate new private invite lint with join approving,** so users can send join requests and bot can approve them <mark style="color:red;">(without this automatic approving will not work):</mark>\
   ![](/files/xcCAZACQupzafpfeMm57)

5. Put the link from previous step to “rate received message”. After the user received the rate, they will receive a link and can send join request (which bot will approve):<br>

   <figure><img src="/files/iopkg8ZSD8leCLaCPpAp" alt=""><figcaption></figcaption></figure>

6. If you want to kick users when their rate expired (due to failed payment, for example), you can click the checkbox “kick when rate removed”.

**Important note:** the bot approves and rejects only new requests. If there were pending join requests or users without rates — the bot will not accept requests or kick users.

***

Something unclear in docs or you know how to improve article? [Message us in community!](https://docs.tgtaps.com/tgtaps-docs/readme/community)\
We will answer you and then promise to improve the article within 3 days.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://tgtaps.gitbook.io/tgtaps-docs/features/rates.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
