Creates a meter event adjustment to cancel a previously sent meter event.
Learn more about calling API v2 endpoints.Parameters
- cancelobjectRequired
Specifies which event to cancel.
- cancel.
identifierstringRequired Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them.
- event_
namestringRequired The name of the meter event. Corresponds with the
event_
field on a meter.name - typeenumRequired
Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
Possible enum valuescancel
Cancel a single meter event by identifier.
Returns
Response attributes
- idstring
The unique id of this meter event adjustment.
- objectstring, value is "v2.billing.meter_event_adjustment"
String representing the object’s type. Objects of the same type share the same value of the object field.
- cancelobject
Specifies which event to cancel.
- cancel.
identifierstring Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them.
- createdtimestamp
The time the adjustment was created.
- event_
namestring The name of the meter event. Corresponds with the
event_
field on a meter.name - livemodeboolean
Has the value
true
if the object exists in live mode or the valuefalse
if the object exists in test mode. - statusenum
The meter event adjustment’s status.
Possible enum valuescomplete
The event adjustment has been processed.
pending
The event adjustment is still being processed.
- typeenum
Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
Possible enum valuescancel
Cancel a single meter event by identifier.
The adjustment configuration is invalid for the adjustment type.
{ "object": "v2.billing.meter_event_adjustment", "id": "mtr_event_adj_12345678", "livemode": false, "created": "2024-06-01T12:00:00.000Z", "status": "pending", "event_name": "ai_search_api", "type": "cancel", "cancel": { "identifier": "idmp_12345678" }}