Sample - Stripe API
POST/v1/billing/meter_event_adjustments

Create a billing meter event adjustment

Creates a billing meter event adjustment that cancels a meter event. Supply event_name and set type to cancel; use cancel.identifier to identify the event when applicable. Time-period cancellation is not supported by the declared schema.

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

4 body fields

Form data describing the billing meter event cancellation.

cancelobjectoptional
Specifies which event to cancel.
event_namestringrequired
The name of the meter event. Corresponds with the `event_name` field on a meter.
expandarray<string>optional
Specifies which fields in the response should be expanded.
typestringrequired
Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
Allowed:cancel

2 status codes
200Returns the billing meter event adjustment with its event name, cancellation settings, live-mode flag, object type, status, and adjustment type.
cancelobjectoptional
Specifies which event to cancel.
event_namestringrequired
The name of the meter event. Corresponds with the `event_name` field on a meter.
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_event_adjustment
statusstringrequired
The meter event adjustment's status.
Allowed:completepending
typestringrequired
Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
Allowed:cancel
defaultError response.
errorobjectrequired

Error handling

event_name and type are required. event_name must not exceed 100 characters, type must be cancel, and cancel.identifier must not exceed 100 characters when supplied.