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

Deactivate a billing meter

Deactivates a billing meter so that it no longer accepts meter events. You also cannot attach a deactivated meter to a price; use expand when the response should include expanded fields.

  • 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 meter to deactivate.

Optional parameters for deactivating a billing meter.

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

2 status codes
200Returns the billing meter with its status set to inactive and its current aggregation settings and timestamps.
createdintegerrequired
Time at which the object was created. Measured in seconds since the Unix epoch.
customer_mappingobjectrequired
default_aggregationobjectrequired
display_namestringrequired
The meter's name.
event_namestringrequired
The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.
event_time_windowstringoptional
The time window which meter events have been pre-aggregated for, if any.
Allowed:dayhour
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.meter
statusstringrequired
The meter's status.
Allowed:activeinactive
status_transitionsobjectrequired
updatedintegerrequired
Time at which the object was last updated. Measured in seconds since the Unix epoch.
value_settingsobjectrequired
defaultReturns an error object containing details about the failed request.
errorobjectrequired

Error handling

id must be a string no longer than 5000 characters. Each value in expand must be a string no longer than 5000 characters.