# `LatticeStripe.Subscription.CancellationDetails`
[🔗](https://github.com/szTheory/lattice_stripe/blob/v1.1.0/lib/lattice_stripe/subscription/cancellation_details.ex#L1)

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 {: .warning}
>
> 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](https://docs.stripe.com/api/subscriptions/object#subscription_object-cancellation_details).

# `t`

```elixir
@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.

# `from_map`

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

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

Returns `nil` when given `nil`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
