> ## Documentation Index
> Fetch the complete documentation index at: https://docs.payglue.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Paywall

> Hide Ghost content behind a payment wall without Stripe using PayGlue.

The PayGlue Paywall hides content on any Ghost post or page so that only members who have purchased access can read it. It works without Stripe — your payment provider handles the purchase, and PayGlue grants Ghost membership automatically after the transaction.

<Frame>
  <img src="https://mintcdn.com/payglue/C3zo0LeG6bKgcCIE/images/payglue-paywall-deno.png?fit=max&auto=format&n=C3zo0LeG6bKgcCIE&q=85&s=54f7b02560fe74cca5d57cd16266ecba" alt="Payglue Paywall Deno" width="1457" height="1572" data-path="images/payglue-paywall-deno.png" />
</Frame>

## How it works

A small script in your Ghost site header checks whether the logged-in member has active access. If not, a paywall overlay appears over the locked content below the embed point. The overlay disappears automatically as soon as the member logs in with an account that PayGlue has already granted access to after a completed purchase.

<Frame>
  <img src="https://mintcdn.com/payglue/C3zo0LeG6bKgcCIE/images/payglue-paywall-click.png?fit=max&auto=format&n=C3zo0LeG6bKgcCIE&q=85&s=4df016f77b04628eb08439dcd86c98b2" alt="Payglue Paywall Click" width="1457" height="1572" data-path="images/payglue-paywall-click.png" />
</Frame>

## What you need

Before using the Paywall, the following must be in place:

* Ghost is connected in PayGlue (Admin API key added)
* A payment provider is connected
* At least one product and one mapping are configured in PayGlue
* The PayGlue header script is installed in your Ghost site header

The overlay appears as soon as the header script and embed are in place. Members can only unlock content once the full payment flow is working: provider connected, product mapped, webhook active.

## Who the Paywall lets through

A visitor passes when their Ghost member record is any of the following:

| Ghost state            | Who that is                                                   |
| ---------------------- | ------------------------------------------------------------- |
| `paid`                 | A subscriber paying through Ghost's own Stripe billing        |
| `comped`               | A PayGlue buyer, where a Stripe account is connected to Ghost |
| `payglue-active` label | A PayGlue buyer, where no Stripe account is connected         |

All three pass, so moving a post from Ghost's own visibility settings onto a PayGlue Paywall keeps your existing subscribers. There is nothing to prepare.

<Warning>
  The Paywall is client-side only. A technically capable visitor can use browser DevTools to view the hidden content without paying. It is well suited for blog posts, newsletter archives, and community content — not for sensitive data such as API keys, credentials, or medical records.
</Warning>

## Setup

<Steps>
  <Step title="Install the header script in Ghost">
    In your PayGlue dashboard, go to **Installation > Header script** and copy the header script.

    <Frame>
      <img src="https://mintcdn.com/payglue/tn_x_ATFnFlUww6-/images/payglue-hjeader-script.png?fit=max&auto=format&n=tn_x_ATFnFlUww6-&q=85&s=4b96c702370f4cda0ba89fefcc406702" alt="Payglue Hjeader Script" width="1457" height="1572" data-path="images/payglue-hjeader-script.png" />
    </Frame>

    Open Ghost Admin and go to **Settings > Code Injection > Site Header**. Paste the script and click **Save**.

    <Frame>
      <img src="https://mintcdn.com/payglue/tn_x_ATFnFlUww6-/images/ghost-custom-code.png?fit=max&auto=format&n=tn_x_ATFnFlUww6-&q=85&s=e8d537377d3e24415f687f6901390cbc" alt="Ghost Custom Code" width="1014" height="1032" data-path="images/ghost-custom-code.png" />
    </Frame>

    The script only needs to be installed once. It runs on every page of your Ghost site automatically.
  </Step>

  <Step title="Create a Paywall config">
    In your PayGlue dashboard, go to **Installation > Paywall** and click **New paywall**.

    Fill in the overlay fields:

    | Field        | What it does                                                      |
    | ------------ | ----------------------------------------------------------------- |
    | Name         | Internal label — not shown to visitors                            |
    | Headline     | Title shown on the overlay                                        |
    | Body text    | Short message below the headline                                  |
    | Button label | Text on the call-to-action button                                 |
    | Button color | Background color of the button (hex)                              |
    | Text color   | Button text color (hex)                                           |
    | Button width | Auto (fits the label) or Full (stretches to container width)      |
    | Alignment    | Left, center, or right alignment of the button within the overlay |

    <Frame>
      <img src="https://mintcdn.com/payglue/z8icUBcULiYie06e/images/payglue-paywall-edit.png?fit=max&auto=format&n=z8icUBcULiYie06e&q=85&s=d64613985fcf39c400ff4cbf2c10b550" alt="Payglue Paywall Edit" width="1457" height="1572" data-path="images/payglue-paywall-edit.png" />
    </Frame>

    **Setting the button link — two options:**

    **Link a product** (recommended) — select a product from your connected provider catalog. The checkout URL fills in automatically.

    **Custom URL** — paste any URL manually. Use this for providers that don't yet support the product picker, for PWYW links, or for Ghost portal links.

    The live preview on the right updates as you type so you can see exactly how the overlay will look before saving.

    Click **Save**. The embed snippet appears below the form.
  </Step>

  <Step title="Embed in your Ghost post">
    Open the Ghost post or page where you want to protect content.

    Add an **HTML card** at the exact point where the paywall should begin. Paste the embed snippet from Step 2 into the card.

    Everything above the HTML card is visible to all visitors. Everything below is hidden behind the paywall overlay.

    <Warning>
      **Set the Ghost article visibility to Public.** Do not use Ghost's built-in "Members only", "Paid members only", or "Specific tiers" visibility settings on articles that use a PayGlue Paywall. If Ghost restricts the article itself, it blocks access before the PayGlue script can run — the paywall overlay never appears and visitors see a Ghost login wall instead. PayGlue handles access control; Ghost must not restrict visibility on its own.
    </Warning>
  </Step>

  <Step title="Test the paywall">
    Open the post in a private or incognito window. The paywall overlay should appear over the content below the embed.

    Log in with a Ghost member account that has active PayGlue access. The overlay should disappear and the full content should be visible.
  </Step>
</Steps>

## Customizing the overlay

You can update the headline, body text, and button style in the Paywall config at any time. Changes apply immediately to every post using that config — no need to update the embed in Ghost.

## Using multiple Paywall configs

You can create multiple configs — for example, one per product or content category. Each config has its own embed snippet. Different posts can show different overlay text and link to different checkout pages.

## Content above the embed is always public

Only content placed after the embed snippet is hidden. Place a teaser paragraph or preview image above the embed so visitors understand what they are unlocking before they see the overlay.

## Ghost button vs. PayGlue Paywall

Ghost has its own built-in member paywall. You can use it if you are already on Stripe. PayGlue's Paywall works with any payment provider — Polar, PayPal, Lemon Squeezy, and more — and gives you full control over the overlay design and button destination.
