# `ShopifexWeb.PaymentHTML`
[🔗](https://github.com/ericdude4/shopifex/blob/main/lib/shopifex_web/controllers/payment_html.ex#L1)

HTML for the plans/billing page rendered by `ShopifexWeb.PaymentController`.

# `api_key`

# `current_grant_list`

The deduped list of grant identifiers the shop currently holds.

# `current_grants`

The shop's current grants as a comma-joined string (kept for back-compat).

# `current_plan?`

True when `plan` grants exactly the shop's current grant set (the active plan).

# `path_prefix`

# `payment_guard`

# `plans_for_guard`

The plans available for `guard`, as schema structs, for server rendering.

# `price_label`

Human price label, e.g. `$9.99/month`, `€100/year`, or `$390 one-time`.

# `select_plan_path`

```elixir
@spec select_plan_path(Plug.Conn.t()) :: String.t()
```

The URL the plans page's Select button POSTs `{plan_id, redirect_after}` to.

Inside the Shopify admin, App Bridge attaches the Bearer `id_token` to that
fetch, so a page that was authenticated with an `id_token` gets the bare
`/payment/select-plan` path. A page authenticated without one (the
non-embedded / legacy HMAC path, reached through the payment guard's
`redirect_token`) has nothing for App Bridge to attach, so the path carries
its own `redirect_token` from `Shopifex.Plug.sign_redirect/3`: signed for the
current shop, bound to this one path, and valid for
3600 seconds. Because the token authenticates
only this path for only this shop, a captured page can at most start a
pending charge that the merchant must still approve in Shopify.

# `shop_url`

# `show_plans`

---

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