> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Billing notifications

export const maia = "Maia";

Billing notifications tell you when your credit consumption crosses a threshold you've set for a project or for your whole account. You define the thresholds on the [Budgets and alerts](/docs/administration/budgets-and-alerts) page, then choose how you want to be notified—by email, Slack, or webhook—from the **Billing** tab of the **Notifications** page. Only Billing admins and Super admins can access the **Billing** tab.

<Note>
  Billing notifications are for information only. They don't affect your pipelines, jobs, or {maia}—a notification simply tells you that credit usage has crossed a threshold.
</Note>

***

## How billing notifications work

Billing notifications are generated from the budgets and thresholds you configure on the [Budgets and alerts](/docs/administration/budgets-and-alerts) page. Each project—and the global budget—has a single entry on the **Billing** tab of the **Notifications** page, where you add the delivery channels for it.

We recommend configuring a budget with thresholds first, then adding delivery channels to it. You can also add a billing notification first and set its budget and thresholds later.

<Note>
  Delivery channels are per-user. Seeing an entry on the **Billing** tab doesn't mean you'll be notified—you receive a notification only through the delivery channels you add for yourself. When one user adds a channel, only that user is notified. Any other user who wants the alerts sees the same entry with a dash in the **Delivery** column and must add their own delivery channels to receive it.
</Note>

Budgets are set at two levels:

* **Global:** Tracks total credit consumption across every project. Resets each contract period.
* **Project:** Sets a credit limit for one or more individual projects.

Each budget has two thresholds:

* **Threshold 1:** The first warning point.
* **Threshold 2:** The second warning point, for a higher level of urgency.

A billing notification fires each time consumption crosses one of these thresholds.

***

## View your billing notifications

1. In the left navigation, click your Profile & Account icon. Then, click **Notifications** from the menu.
2. Click the **Billing** tab.

Each budget you've configured appears as a row, showing:

* **Type:** Whether the notification is **Global** or scoped to a **Project**.
* **Project:** The project the notification applies to (blank for global notifications).
* **Thresholds:** The two threshold levels at which the notification fires, shown as percentages.
* **Delivery:** The channels you've added to receive this notification, or a dash if you haven't added any yet.

<Tip>
  You can also reach the **Billing** tab by clicking **Manage notifications** on the [Budgets and alerts](/docs/administration/budgets-and-alerts) page.
</Tip>

***

## Add a delivery channel

Add one or more delivery channels to a billing notification to choose how you're notified when its thresholds are crossed.

1. On the **Billing** tab, find the notification entry you want to configure.
2. Click the **...** (more options) icon for that entry, then click **Add**.
3. In the **Add billing notification** dialog, review the **Project** and **Thresholds** shown at the top.
4. Under **How do you want to receive this notification?**, select one or more channels: **Email**, **Slack**, or **Webhook**.
5. Complete any additional fields required for the channels you selected (see [Delivery channels](#delivery-channels)).
6. Click **Save**.

<Note>
  To create a new billing notification from scratch, click **Add billing notification** at the top of the **Billing** tab. Add its budget and thresholds afterward on the [Budgets and alerts](/docs/administration/budgets-and-alerts) page.
</Note>

***

## Delivery channels

Select a delivery channel to see how it's set up:

<Tabs>
  <Tab title="Email">
    When you select **Email**, notifications are sent to the email address associated with your {maia} account.

    No additional setup is required. Once you select **Email** and click **Save**, notifications are delivered automatically when your thresholds are crossed.
  </Tab>

  <Tab title="Slack">
    When you select **Slack**, notifications are sent to a Slack channel of your choice via an incoming webhook URL.

    ### Prerequisites

    Before setting up Slack delivery, you must create a Slack app and generate an incoming webhook URL in your Slack workspace. For step-by-step instructions, see [Sending messages using incoming webhooks](https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks/).

    ### Setup

    When configuring Slack as a delivery channel, provide the following:

    * **Slack Webhook URL:** The incoming webhook URL generated in your Slack workspace.
    * **Slack Webhook Name:** A label to help you identify this webhook later.
  </Tab>

  <Tab title="Webhook">
    When you select **Webhook**, notifications are sent as HTTP POST requests to an endpoint of your choice. You can also supply a custom JSON payload template to control exactly what data is sent.

    <Note>
      Webhook notifications are outbound only. {maia} can't receive incoming webhook data or use webhooks to trigger pipeline runs. Outbound payloads aren't signed with HMAC, so receiving endpoints can't use HMAC to verify the request.
    </Note>

    ### Setup

    When configuring a webhook as a delivery channel, provide the following:

    * **Webhook URL:** The endpoint that receives the notification.
    * **Webhook Name:** A label to identify this webhook later.
    * **Payload:** A custom JSON template using `${variableName}` syntax to control the notification body. Click **View available variables** to see the full list of supported variables.

    ***

    ### Available variables

    The following variables are available for use in the payload template. Select the ones that best fit your needs.

    | Variable         | Description                |
    | ---------------- | -------------------------- |
    | `${projectId}`   | Project ID                 |
    | `${accountId}`   | Account ID                 |
    | `${productType}` | Product type               |
    | `${threshold}`   | Alert threshold percentage |
    | `${actualUsage}` | Actual credit usage        |
    | `${triggeredAt}` | Alert trigger timestamp    |
  </Tab>
</Tabs>

***

## Managing billing notifications

After adding a delivery channel, you'll return to the **Billing** tab, where the **Delivery** column now shows the channels you selected.

To edit the delivery channels for a notification, click the **...** (more options) icon next to it and click **Edit**. Modify your selections as needed, then click **Save**.

To remove the delivery channels, click the **...** (more options) icon and select the delete option, then confirm.

<Note>
  Removing a notification's delivery channels doesn't delete the underlying budget or thresholds—those are managed on the [Budgets and alerts](/docs/administration/budgets-and-alerts) page.
</Note>
