A Discourse plugin that adds a Pay-with-U.CASH tip button to every post in a topic. Readers can tip a post's author in crypto or by card. Payments are non-custodial: funds go straight to the store's configured receive addresses via pay.u.cash.
- One button per post, styled to match your Discourse theme.
- Crypto (BTC, ETH, USDC, and more) plus card payments via Stripe.
- Non-custodial. The plugin only ever holds your publishable store Cloud token, which is safe to expose in the browser.
Each tip opens the hosted U.CASH checkout at https://pay.u.cash/embed.php with your store's Cloud token, the tip amount, the currency, and an external_reference that ties the payment back to the specific Discourse post (so you can reconcile tips in your pay.u.cash dashboard).
The Cloud token used here is publishable: it can only create checkouts that pay your store, it cannot move funds or read balances. Keep your secret account-level keys off the forum.
Add the plugin repo to the hooks block in /var/discourse/containers/app.yml:
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone https://github.com/UdotCASH/discourse-ucashpay.gitThen rebuild the container:
cd /var/discourse
./launcher rebuild appInside your Discourse source checkout:
cd plugins
git clone https://github.com/UdotCASH/discourse-ucashpay.gitRestart Discourse (or bin/ember serve in development).
- Go to Admin -> Settings -> Plugins -> discourse-ucashpay (or search "ucashpay" in settings).
- Enable discourse ucashpay enabled.
- Paste your store Cloud Token into discourse ucashpay cloud token.
- Optionally set the currency (default
USD), the per-tip amount, the title shown at checkout, and the button label.
The tip button now appears under every post.
A reader clicks the Tip button under a post. The U.CASH hosted checkout opens in a new tab with the amount, currency, and a reference (discourse:<topic_id>:<post_number>) identifying that post. They pay in crypto or by card. You reconcile tips in your pay.u.cash dashboard using the external_reference.
- 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.
This plugin uses the publishable, client-side hosted pay link:
GET https://pay.u.cash/embed.php
cloud # your store Cloud Token (publishable)
amount
currency # default USD
title
external_reference # e.g. discourse:<topic_id>:<post_number>
redirect
No server secret is required. If you later want server-side tracked, idempotent checkouts (e.g. from a webhook listener), pay.u.cash also exposes:
POST https://pay.u.cash/payment/ajax.php (application/x-www-form-urlencoded)
function=create-transaction
amount
currency_code
cryptocurrency_code= # empty string
external_reference
title
redirect
cloud
idempotent=1
-> JSON { success: true, response: [paymentUrl, transactionId, ...] }
(the payment URL is the array element beginning with http(s)://)
The browser-side embed.php link is sufficient for the tip button.
MIT. See LICENSE.