Alerts provide the core signal for any spend‑control workflow.

Subscriptions with prepaid credits

  • A balance depleted alert indicates that the customer’s prepaid credit ledger has been depleted, and you should block product access or usage.
  • To enforce a hard cap where the customer should always pay only for usage in advance, you must account for the brief delay between depletion and the alert:
    • Set the conversion rate for prepaid credits to $0 (this effectively means that you absorb the cost of the overage and do not pass it onto your customer), or
    • Charge the user for any overage per the assigned conversion rate of the price, or
    • Add credits effective a past timestamp to cover the overage charges. Orb will automatically apply those credits against existing usage by replaying the credits ledger.

See the implementation guide on product access with prepaid credits for more information.

Subscriptions with in-arrears billing

  • Respond to the cost exceeded alert by blocking product access or usage.
  • Configure a maximum amount as an adjustment in your subscription configuration in addition to an alert.
  • In the event that there’s a delay between the maximum being reached and the alert being sent from Orb, the customer is never charged above the maximum and the maximum limit will still be honored on the invoice.

Building spend management in your application

Keep the following in mind when building spend management in your application:

  1. Allow users to define soft and hard spend limits, each with multiple thresholds. Warning thresholds should be used to notify the user that they are approaching the limit if hard limits are being used to block.
  2. Provide a graceful paused state in your application when a limit is reached.
  3. Send notifications—webhooks, email, or SMS—whenever a threshold is crossed.
  4. Depending on your product contract, you may need to inspect the subscription state when you receive an alert to determine the end of the billing period. This may be important to know when product access should be ungated, or a piece of infrastructure should resume operation.
GoalAction
Notify the userUse the webhook to trigger a notification over email, SMS, or webhook.
Block product access or usageDisable product functionality until the next billing period begins (based on the subscription state).