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

# Billing Rules

Create and Manage Rules

Create a Rule, [assign](https://itera.gitbook.io/taikun/user-guide-1/partner/organizations#actions) it to the organization and see the result in [**Chargeback**](https://itera.gitbook.io/taikun/user-guide-1/partner/chargeback).

![Fig. 1: Billing Rules](https://2158992251-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJQrhtis3vRAM281R7J%2F-MhrnCqdKPII_JL2kAMk%2F-MhrrCttFVgLi88ono2L%2Fbilling%20rules.png?alt=media\&token=0dabb734-433d-41f8-855f-67f53877888b)

**Rules** can be sorted by *Name*, *Metric Name*, *Created* and *Type*.

By clicking arrow > you can expand the table to see *Created By*, *Last Modified* and *Last Modified By*.

### New Rule

To create Rule use <img src="https://2158992251-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJQrhtis3vRAM281R7J%2F-MM-kagab7vjv2dfOMB9%2F-MMFiglJ1M9gHREVC31u%2Fadd%20rule.png?alt=media&amp;token=5a623bfc-55f8-4d2f-baf7-b1c4ce47bb9f" alt="" data-size="original"> button.

![Fig. 1: Add Rule](https://2158992251-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJQrhtis3vRAM281R7J%2F-MhrWar6YVhSYPNT58JU%2F-MhrfmObc5wUzFdk4px9%2Fadd%20rule.png?alt=media\&token=ee6e28a6-0af0-47de-89b2-74a9adbaa80e)

*Name* - Rule name

*Metric Name* - exact metric name from Prometheus (e.g. volumes, flavor, networks) you want to bill, if you select *Billing credentials* first, you can choose from drop-down selection (wit autocomplete)

*Bind rule to organization* - assign rule to selected organization or choose none and bind it later

*Billing Credentials* - drop-down of operation credentials

*Type* - drop-down: Count (calculate package as unit - e.g. flavors) or Sum (calculate per quantity - e.g. GBs)

*Price* - billing in CZK per selected unit

*Price Rate* - in percents (0-1000 %), 100 equals one

*Add Label* - The label indicates the variable name (*Label*) and value of the label (*Label Value*), see the **Table 1** below

**Table 1: Labels in Billing Rules**

| Label             | Label Value |
| ----------------- | ----------- |
| Flavor            | n0.xmedium  |
| taikun\_org\_name | itera       |
| taikun\_org\_id   | 2           |

{% hint style="warning" %}
Once you bind the organization the cron job starts to calculate. The billing starts at the beginning of every hour and once it's bound to organization, it can't be paused.
{% endhint %}

### Actions

Change the properties of the rule.

####

#### <img src="https://2158992251-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJQrhtis3vRAM281R7J%2F-MUsQYF6_AsggYgvgPkA%2F-MUse_BbCbUeHlVjMZSw%2Fpanelak.png?alt=media&amp;token=7311a898-2e47-41e2-9bce-f38ab4f134e5" alt="" data-size="original">Bound Organizations

Select the organization you want to assign the rule and then click the assign button. If you choose a new organization the billing starts from the beginning of next hour.

#### :pencil2:Edit Prometheus Info

Update the rule and change the parameters.

#### <img src="https://2158992251-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJQrhtis3vRAM281R7J%2F-MXCK3Pg8Mol1J2in1j7%2F-MXCh-IW-oEFDMiNugJ7%2Fcopy.png?alt=media&amp;token=e87dbae6-dd7d-4e37-a83f-ec24c6807c58" alt="" data-size="line">Copy Rule

When creating similar rule, when you want to change just one or few parameters, you can use copy button - window with copied parameters will pop-up.

#### <img src="https://2158992251-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJQrhtis3vRAM281R7J%2F-MLIWnQGJq1o-rAwqVbz%2F-MLIu4yNM52tJrYQ_IRc%2Fdelete.png?alt=media&amp;token=1df0232f-aa18-48ff-8e52-6966f0d0b335" alt="" data-size="original">Delete

Delete the rule if no longer needed.
