Overview
Credits consumption alerts help you monitor wallet balances and notify your customers when their credits are running low. They are essential for:- Allowing customers to track their remaining credits and plan top-ups before running out;
- Alerting customers when their wallet balance or ongoing balance drops below critical thresholds; and
- Triggering automated workflows such as auto top-ups or usage restrictions when credits reach predefined levels.
Credits consumption alerts are a premium feature. Free users cannot create wallet alerts.
Create an alert
- Dashboard
- API
An alert must be tied to a specific wallet. To create an alert for a particular wallet, follow these steps:
- Access the “Customers” section via the side menu;
- Select a customer from the list;
- Open the “Wallets” tab and select a wallet;
- Click on the “Alerts” tab;
- Click on the “Add an alert” button;
- Select the type of alert (e.g., Wallet Ongoing Balance);
- Set the progressive thresholds and code for the alert;
- Define the optional recurring threshold for the alert; and
- Click on the “Create alert” button to confirm.
Unlike usage alerts where thresholds are increasing, wallet alert thresholds must be decreasing — each new threshold must be lower than the previous one. You can define up to 20 thresholds per alert, plus an optional recurring threshold.
The alert threshold
code helps distinguish between different types of alert notifications. For example, some notifications may indicate a soft limit, while others may trigger a hard limit, each with different levels of urgency or action required.Alert types
Lago supports the following credits consumption alert types. You can create one alert per type on each wallet. You can also create multiple alerts at once using the batch create endpoint, or delete all alerts for a wallet in a single API call.- Wallet Balance Amount: Triggered when a wallet’s balance drops below predefined thresholds. Values are expressed in the customer’s currency. The minimum threshold value is 0.
- Wallet Credits Balance: Triggered when a wallet’s credits balance drops below predefined thresholds. Values are expressed in credits. The minimum threshold value is 0.
- Wallet Ongoing Balance Amount: Triggered when a wallet’s ongoing balance drops below predefined thresholds. Values are expressed in the customer’s currency. Thresholds can be negative since the ongoing balance can go below zero.
- Wallet Ongoing Credits Balance: Triggered when a wallet’s ongoing credits balance drops below predefined thresholds. Values are expressed in credits. Thresholds can be negative since the ongoing balance can go below zero.
Thresholds
Decreasing thresholds
Wallet alert thresholds must be decreasing from one to another, representing gradual levels as the balance drops. You can define up to 20 thresholds per alert, each with an optional name. For example, with a starting wallet balance of USD 500, you might set thresholds at USD 100, USD 50, and USD 10. As the balance decreases:- When the ongoing balance crosses USD 100, Lago triggers a notification;
- When the ongoing balance crosses USD 50, Lago triggers a notification; and
- When the ongoing balance crosses USD 10, Lago triggers a notification.
Recurring threshold
In addition to progressive thresholds, you can define an optional recurring threshold. This threshold triggers the alert repeatedly each time it is crossed, avoiding the need to create an endless list of individual thresholds.Alert notifications
After configuring an alert, you can listen for thealert.triggered webhook message. These webhooks serve as notifications sent to your system, indicating when an alert threshold has been crossed, along with all the relevant alert details.
Limitations
Please consider the following limitations for credits consumption alerts:- Credits consumption alerts are a premium feature;
- Alerts only evaluate wallet data after their creation;
- Alerts run on a default 5-minute interval clock, aligned with the wallet refresh cycle. Contact the team if you need a different frequency;
- Only one alert per alert type can be created on each wallet; and
- Each alert supports up to 20 decreasing thresholds, plus one optional recurring threshold.