Adds a U.CASH Pay support / membership button to a Ghost theme. Readers can pay with crypto or card. Fully non-custodial: funds go straight to the wallet addresses you set on your pay.u.cash store, never to a middleman.
This package is frontend-only. No Ghost Admin API, no plugin, no server route required. You either drop a theme partial into your theme and re-upload it, or paste an HTML snippet into Ghost Code Injection.
U.CASH Pay is a hosted checkout. The link uses your store Cloud Token, which is publishable and safe to put in the browser. It can create checkouts for that store only; it cannot move funds or read balances.
The button links to a hosted U.CASH checkout page:
https://pay.u.cash/embed.php?cloud=<STORE_CLOUD_TOKEN>&amount=<AMOUNT>¤cy=<CURRENCY>&title=<TITLE>&redirect=<REDIRECT>
When a reader clicks it, pay.u.cash renders a checkout where they pick a coin (or pay by card if you connected Stripe) and pay your store's receive addresses directly.
-
Copy
members-support.hbsinto your theme, e.g.partials/members-support.hbs. -
Configure your store Cloud Token and amount in your theme's
package.jsonunderconfig:"config": { "ucash_cloud": "st_your_store_cloud_token", "ucash_amount": "5", "ucash_currency": "USD", "ucash_title": "Support My Blog" }
(The partial also reads
@custom.ucash_*settings, so you can wire these up as theme custom settings.) -
Include it in any template, for example at the end of
post.hbs: -
Zip and upload your theme under Ghost Admin -> Settings -> Theme -> Upload theme.
- Open
code-injection-snippet.hbsand replace the placeholders:__CLOUD_TOKEN__,__AMOUNT__,__CURRENCY__,TITLE. - Go to Ghost Admin -> Settings -> Code Injection.
- Paste the resulting HTML into Site Header (site-wide) or Post Header (single post).
Because Option B is plain HTML/CSS, it works everywhere without touching theme files.
Whichever option you choose, set:
| Field | Required | Example | Notes |
|---|---|---|---|
cloud |
yes | st_your_store_cloud_token |
Store Cloud Token from Account -> Stores. |
amount |
yes | 5 |
Numeric amount in currency. |
currency |
no | USD |
Defaults to USD. |
title |
no | Support My Blog |
Shown on the pay page. |
redirect |
no | https://yoursite.com/thanks |
Where to send the reader after payment. |
Ghost's native memberships track recurring tiers inside Ghost. U.CASH Pay handles one-off payments here, so this button is best for tips / support / one-time contributions. Crypto recurring billing is not something the hosted pay link can do automatically today, so each click is a single payment. To gate content after a one-off payment, set redirect to a members-only URL on success.
- Sign up at pay.u.cash, then click the verification link in the email.
- Set receive addresses under Settings -> Addresses (raw address, ENS, Unstoppable Domains, or FIO).
- Create a store under Account -> Stores and copy its Store Cloud Token (use the store-level token, not the account-wide one).
- For fiat cards, connect your own Stripe under Settings -> Payment processors.
members-support.hbs- theme partial (Option A).code-injection-snippet.hbs- plain HTML snippet for Code Injection (Option B).LICENSE- MIT.
-
The
cloudvalue is a publishable store Cloud Token, safe to expose in the browser. Treat it like a publishable key, not a secret. -
If you ever rotate the store Cloud Token in pay.u.cash, update the value in your theme config or Code Injection.
-
This integration does not handle order confirmation webhooks. For server-side order tracking (e.g. to mark a payment complete), use the pay.u.cash server-side checkout endpoint from a server route, not from the browser. That endpoint is idempotent per
external_reference:POST https://pay.u.cash/payment/ajax.php Content-Type: application/x-www-form-urlencoded function=create-transaction &amount=5 ¤cy_code=USD &cryptocurrency_code= &external_reference=<your_unique_ref> &title=Support &redirect=https://yoursite.com/thanks &cloud=st_your_store_cloud_token &idempotent=1The response is JSON
{ "success": true, "response": [paymentUrl, transactionId, ...] }. The element starting withhttp(s)://is the payment URL to redirect the payer to.
MIT. See LICENSE.