Detect when a customer’s prepaid‑credit balance is depleted, drops below a threshold, or recovers.
Alert type | Fires when the prepaid ledger… | Webhook event |
---|---|---|
Balance depleted | Transitions > 0 → 0 | customer.credit_balance_depleted |
Balance dropped | Transitions ≥ configured threshold → below threshold | customer.credit_balance_dropped |
Balance recovered | Transitions 0 → > 0 | customer.credit_balance_recovered |
Trigger category | Specific events | Notes |
---|---|---|
Usage events | • Real‑time usage that draws down credits from the balance based on the billable metrics on the subscription. | See Usage‑based triggers for more information about expected latencies. |
Credit blocks | • Activation (manual creation, creation due to an automatic allocation on the plan, or as the result of an automated top‑up) • Expiration or voiding | Block mutations may lag usage‑based triggers by a few minutes. |
Alert config changes | • New balance alert created • Alert threshold added or removed | Forces immediate re‑evaluation so the new configuration is active within seconds. |
balance_alert_status
.balance_alert_status
serialized on the alert for the ground‑truth snapshot.