LatticeStripe.Subscription.CancellationDetails (LatticeStripe v1.1.0)

Copy Markdown View Source

Represents the cancellation_details nested object on a Stripe Subscription.

Captures customer-provided context about why a subscription was canceled:

  • reason — the cancellation reason (e.g., "cancellation_requested", "payment_disputed", "payment_failed")
  • feedback — standardized feedback code (e.g., "too_expensive", "switched_service")
  • comment — free-form customer comment (may contain PII)

PII safety

The comment field may contain personal information. Inspect masks this field as "[FILTERED]" by default. Access struct.comment directly to read the raw value — and avoid logging it.

See Stripe Subscription API.

Summary

Types

t()

Cancellation details for a Stripe Subscription.

Functions

Converts a decoded Stripe API map to a %CancellationDetails{} struct.

Types

t()

@type t() :: %LatticeStripe.Subscription.CancellationDetails{
  comment: String.t() | nil,
  extra: map(),
  feedback: String.t() | nil,
  reason: String.t() | nil
}

Cancellation details for a Stripe Subscription.

Functions

from_map(map)

@spec from_map(map() | nil) :: t() | nil

Converts a decoded Stripe API map to a %CancellationDetails{} struct.

Returns nil when given nil.