Listen for spend limit changes
A spend limit restricts the amount that a subscription can spend on a particular usage type in each rating period. Each spend limit has one or more alert thresholds.
Smile emits a message on SmileSubscription when a subscription crosses an alert threshold. To help customers manage their monthly spend, you can write an application that listens for the messages and notifies a customer when they cross an alert threshold.
Smile emits the following spend limit messages when:
- SubscriptionSpendLimitExceeded—a subscription exceeds a spend limit.
- SubscriptionSpendLimitReceded—a subscription that had exceeded a spend limit is within the spend limit again, for example, the spend limit is reset at the start of the next rating period.
- SubscriptionSpendLimitStatusUpdate—a subscription crosses a spend limit alert threshold, or a spend limit is reset at the start of a rating period.