# `LatticeStripe.BillingPortal.Configuration.Features.SubscriptionCancel`
[🔗](https://github.com/szTheory/lattice_stripe/blob/v2.3.0/lib/lattice_stripe/billing_portal/configuration/features/subscription_cancel.ex#L1)

The `subscription_cancel` feature settings on a
`LatticeStripe.BillingPortal.Configuration`.

Controls whether customers can cancel their subscriptions in the billing portal
and how the cancellation flow behaves.

## Level 3+ fields as raw maps

`cancellation_reason` contains nested options (`enabled`, `options` list) that
form a Level 3+ sub-object. Per D-01 (6-module nesting cap), Level 3+ objects
are stored as raw `map() | nil` rather than dedicated structs. This avoids
struct explosion while still making the data accessible via direct map access.

Parent struct: `LatticeStripe.BillingPortal.Configuration.Features`.

# `t`

```elixir
@type t() :: %LatticeStripe.BillingPortal.Configuration.Features.SubscriptionCancel{
  cancellation_reason: map() | nil,
  enabled: boolean() | nil,
  extra: map(),
  mode: String.t() | nil,
  proration_behavior: String.t() | nil
}
```

# `from_map`

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

---

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