Skip to content

About

PayGlue connects Ghost CMS to your payment provider.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

PayGlue

PayGlue-OS

Sell Ghost memberships with your payment provider, not just Stripe.

Latest release License: BUSL 1.1 Python 3.13+ Vue 3 PRs welcome


PayGlue: sell Ghost memberships with your payment provider

📝 The Story

I run a several german Ghost blogs and wanted to accept payments through LemonSqueezy, not Stripe. Ghost said no. So I built PayGlue: a relay that receives signed webhooks from your payment provider and syncs membership state into Ghost via the Admin API. Someone pays, they get access. Someone cancels, access is revoked. No Ghost code changes, no manual syncing, no spreadsheet of shame.

Eight providers, one relay: Polar · LemonSqueezy · PayPal · Gumroad · Paddle · Ko-fi · Creem · Patreon

Your existing Stripe setup stays untouched. PayGlue runs next to it and only covers what Ghost can't do natively.

Status: Open beta. This repo contains the exact code running the hosted product at payglue.io. Rather not run it yourself? The hosted version is the same code, minus the ops. See the changelog for what changed.

🎬 The whole product in one minute

A purchase at your payment provider, a member in Ghost. That is the whole product, and the trailer shows it in just over a minute:

PayGlue: Sell Ghost memberships with your payment provider

👀 See it running before you clone anything

The best pitch is a working paywall. All of these are live, powered by this codebase (yes, we eat our own dog food, it pays our bills):

Try it What you'll see
The paywall on our own blog Content gating on a real Ghost site, no Stripe connected
A full pricing table inside a Ghost post Embedded table with live sandbox checkout
Embedded payment buttons Three buttons, one dashboard
A production German tech blog PayGlue in the wild, real members, real money

⚙️ How it works

Customer pays  →  Provider sends signed webhook  →  PayGlue verifies signature
              →  Maps product to Ghost tier      →  Ghost Admin API updates the member
  1. Customer buys through any supported provider
  2. Provider sends a signed webhook to PayGlue
  3. PayGlue verifies the cryptographic signature (HMAC or RSA depending on provider) and maps the product to a Ghost membership tier
  4. Ghost Admin API creates or updates the member automatically

demo

Embedded paywall and pricing table on a live Ghost blog

The synced member as it appears in Ghost Admin

🚀 Quickstart (self-hosting)

Self-hosting is free, no license fee, no catch. You need Docker, a running Ghost instance, an account with at least one payment provider, and about one coffee's worth of time. No external account is required to sign in: the installation keeps its own accounts unless you tell it otherwise.

git clone https://github.com/PayGlue/PayGlue-OS.git
cd PayGlue-OS
cp .env.example .env
# One value has to be filled in before anything starts, the key that encrypts
# stored provider credentials. .env tells you the command; it is one line.
# Ports already in use? Set POSTGRES_HOST_PORT and friends in the same file.
docker compose up -d postgres redis
docker compose run --rm web python manage.py migrate
docker compose up -d

Then open the dashboard at http://localhost:5173. On first run it walks you through creating your account and your first publication, then asks for your Ghost site (URL + Admin API key). After that, connect a provider and map your products to Ghost tiers.

selfhost-onboarding

That first-run screen appears only while the installation has no account. Once one exists, the address shows the normal sign-in page and there is no way back in except by invitation, which is checked on the server rather than in the browser.

The complete walkthrough, including per-provider setup, auth options, and recommended services for Postgres/Redis/deployment, lives in SETUP.md. Full product documentation is at docs.payglue.io, written for the hosted version but the walkthroughs apply to self-hosted installs just the same.

Stack at a glance
Layer Technology
Frontend Vue 3 + TypeScript, Cloudflare Pages
Backend Django + Celery, Python 3.13+
Auth Accounts kept by the installation, or Supabase Auth (ES256 JWT) / any JWKS-compatible issuer
Database PostgreSQL
Queue / Cache Redis
Webhook proxy Cloudflare Workers (included), or any reverse proxy

No hard dependency on any specific cloud provider. Docker Compose brings up everything locally.

Webhook smoke test
curl -i -X POST "http://localhost:8000/t/your-tenant/webhooks/polar/dev-token/" \
  -H "Content-Type: application/json" \
  -d '{"type":"order.paid","data":{"customer":{"email":"test@example.com"}}}'
# Expected: 202 Accepted

🔌 Provider status

Live: Polar, Lemon Squeezy, PayPal, Gumroad, Paddle, Ko-fi, Creem, Patreon. Each ships with encrypted credential storage, health checks, webhook signature verification, and product autofetch.

Configuring a payment provider in the PayGlue dashboard

Missing yours? Open a discussion. Provider order is largely decided by who asks, so ask.

🔐 Security

Two-layer model for inbound webhooks: a URL endpoint token for proxy authentication, plus per-provider cryptographic signature verification (HMAC-SHA256 for Polar and Lemon Squeezy, RSA-SHA256 for PayPal). Credentials are encrypted at rest (AES-256). Boring by design, this thing sits next to your revenue.

Full architecture and vulnerability disclosure process: SECURITY.md

Connecting a Ghost site in the PayGlue dashboard

🤝 Contributing

Contributions are welcome and rewarded, and we mean the second part literally. New provider adapters live in backend/src/payglue_backend/webhooks/adapters/, Polar and Lemon Squeezy are the cleanest references to follow. Contributors who want to run PayGlue on their own Ghost site using our infrastructure get a goodie.

Workflow, branch naming, and PR conventions: CONTRIBUTING.md · Reach out: team@payglue.io

🥚 One more thing

Somewhere in this source code hides a small thank-you for people who actually read it. First finders win. No hints. Happy hunting.

📄 License

Business Source License 1.1, converting to Apache 2.0 four years after each version's release. Self-hosting for your own Ghost site is free. Offering PayGlue as a managed service to others requires a commercial license. Details: LICENSE.md

About

PayGlue connects Ghost CMS to your payment provider.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages