Stripe Billing MeterEventAdjustment — correct a previously-reported
MeterEvent within Stripe's 24-hour cancellation window. Create-only.
Only the cancel action is currently exposed by Stripe; it must contain
a cancel.identifier matching the identifier of the event you want to
cancel. See guides/metering.md → "Corrections and adjustments" for the
dunning worked example.
Summary
Functions
Create a meter event adjustment. The cancel param MUST be a nested map
with an identifier key — NOT a top-level identifier, NOT cancel.id,
NOT cancel.event_id. Example
Bang variant of create/3. Raises LatticeStripe.Error on failure.
Decode a Stripe-shaped string-keyed map into a %MeterEventAdjustment{}.
Types
Functions
@spec create(LatticeStripe.Client.t(), map(), keyword()) :: {:ok, t()} | {:error, LatticeStripe.Error.t()}
Create a meter event adjustment. The cancel param MUST be a nested map
with an identifier key — NOT a top-level identifier, NOT cancel.id,
NOT cancel.event_id. Example:
MeterEventAdjustment.create(client, %{
"event_name" => "api_call",
"cancel" => %{"identifier" => "req_abc"}
})Stripe enforces a 24-hour cancellation window from the original event's
created timestamp; adjustments outside this window return out_of_window.
@spec create!(LatticeStripe.Client.t(), map(), keyword()) :: t()
Bang variant of create/3. Raises LatticeStripe.Error on failure.
Decode a Stripe-shaped string-keyed map into a %MeterEventAdjustment{}.
The cancel sub-object is decoded into %Cancel{} via Cancel.from_map/1.
Unknown top-level keys land in :extra.