# `AshBilling.Checks.Subscribed`
[🔗](https://github.com/sfelixalejandro/ash_billing/blob/v0.1.3/lib/ash_billing/checks/subscribed.ex#L1)

An Ash policy check that authorizes if the current actor has an active billing subscription.

Can be used as a simple check without options, or with a `:price` option to require a specific tier.

## Usage

    policies do
      # Authorize any active subscription
      policy action(:generate_report) do
        authorize_if AshBilling.Checks.Subscribed
      end

      # Authorize only users subscribed to a specific price/tier
      policy action(:export_enterprise_data) do
        authorize_if {AshBilling.Checks.Subscribed, price: "price_enterprise_annual"}
      end
    end

## Options

  * `:price` - An optional price identifier to require.
  * `:domain` - The Ash domain to use when lazy-loading subscriptions (defaults to the domain in context).

# `eager_evaluate?`

# `init`

# `prefer_expanded_description?`

# `requires_original_data?`

# `strict_check`

# `type`

---

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