# Checkout `/checkout/[username]` · `apps/{bull,bear}/src/app/(flow)/checkout/[username]/page.tsx` · Type: cart and checkout · Layout: [layout.md](layout.md) | Field | Value | | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Robots | `noindex` (page `metadata`) | | Status | `200`, because `loading.tsx` wraps the page: an invalid username renders the not-found UI in the stream; another spelling of the username redirects in the stream to the stored one, with `?code=` kept (0059), not a 308; an unknown channel shows `StatusEmptyState` (not-found) in the page; a suspended channel sends the visitor to the channel with `router.replace` in the browser (`useCheckoutChannel`) | | loading.tsx | `checkout/[username]/loading.tsx`: bull: the bar; bear: the header and title; then `CheckoutSkeleton` with `CheckoutCreatorSkeleton`, `delayed` | | First flush | none: the server reads nothing (0070); `useCheckoutChannel` reads `channelPageQuery(username)` in the browser, and the page shows `CheckoutSkeleton` (not delayed) until it arrives | | Canonical | none: `noindex` | | H1 | bull: none (the bar's name isn't a heading); bear: `DesktopPageTitle`, `payment:checkout.title` | | JSON-LD | none | | Scripts | none beyond the layout's | ## Sections In bull's document order. | Section | Data | HTML | JS | Index | Notes | | ------------------------------------------------------- | ---------------------------- | -------- | ------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | MobileTopBar (bull) | config | streamed | hydrate | no | back to the channel (`parentHref` from the URL); no bottom nav | | DesktopHeader (bear) | viewer | streamed | hydrate | no | rows as in [layout-main.md](layout-main.md) | | DesktopPageTitle (bear) | config | streamed | hydrate | no | back to the channel, beside the title | | CheckoutCreator | `channelPageQuery(username)` | skeleton | hydrate | no | avatar, name and @username; `CheckoutCreatorSkeleton` inside the page's skeleton until the read arrives | | CheckoutPanel | viewer | skeleton | hydrate | no | `AuthGuard role="investor"`: a guest goes to login and back, a creator gets no-access; `useInviteLink` keeps `?code=` for this creator on arrival (0059, 0030); its own `PartBoundary` | | ↳ CheckoutForm: tiers, invite note and code, pay footer | query | skeleton | hydrate | no | `useCheckoutPage`'s browser read; the skeleton stays while a payment left at the bank settles (0033); a reactivation shows the start-today note instead of the code (U11) | | ↳ CheckoutHalts | query | none | hydrate | no | dialogs when the investor can't pay here | | ↳ NoCodeSheet | `channelPageQuery(username)` | none | hydrate | no | «کد ندارم»: where to get a code, from the creator's links; mounts when opened | ## Notes - bull pins the pay block to the bottom of the screen; bear sticks it to the bottom of the window in a 480 column. Same sections otherwise. - The redirect and not-found cases run after the skeleton is sent, so they never set the status line. That is fine for a `noindex` page reached only from the channel's «اشتراک». - 0070: the page shares `channelPageQuery` with the channel, so a visitor coming from the channel finds it cached. - Debt: different H1 per app. bull has no `h1`; add a screen-reader `h1` to `CheckoutTemplate` in bull (`apps/bull/src/app/(flow)/checkout/[username]/templates/checkout-template/CheckoutTemplate.tsx:19`).