Skip to main content

When this fires

The async usage processor fires this once when a deduction moves the credit balance from positive to zero. From this point, usage requests that need more credits than remain are rejected with insufficient_credits. customer.state_changed fires alongside it with trigger credits_depleted, carrying the customer’s full current entitlement state. Use it to block gated features in your app and drive the customer to a credit pack purchase.

Body

application/json
id
string
required
event
string
required
Allowed value: "credits.depleted"
timestamp
string
required
organizationId
string
required
mode
enum<string>
required
Available options:
live,
sandbox
apiVersion
string
required
data
object
required

Response

200

Return any 2xx status code to acknowledge receipt of the event.