Sample - Stripe API
POST/v1/billing/alerts/{id}/deactivate

Deactivate a billing alert

Deactivates a billing alert so it no longer triggers when its monitored usage threshold is crossed. Supply the alert id and optionally use expand to include additional response fields. The response contains the billing alert with its updated inactive status.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.
  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 1 body field
idstringrequired
The unique identifier of the billing alert to deactivate.

Optional form-encoded parameters for controlling the response.

expandarray<string>optional
Specifies which fields in the response should be expanded.

2 status codes
200Returns the deactivated billing alert, including its identifier, alert type, title, and updated status.
alert_typestringrequired
Defines the type of the alert.
Allowed:usage_threshold
idstringrequired
Unique identifier for the object.
livemodebooleanrequired
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:billing.alert
statusstringoptional
Status of the alert. This can be active, inactive or archived.
Allowed:activearchivedinactive
titlestringrequired
Title of the alert.
usage_thresholdobjectoptional
Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://docs.stripe.com/api/billing/meter).
defaultError response.
errorobjectrequired

Error handling

id must identify the billing alert to deactivate and must not exceed 5000 characters. Each value in expand must be a string of no more than 5000 characters.