Sell digital products with U.CASH Pay (crypto + cards), a lightweight Gumroad-style checkout. Non-custodial.
Gumroad does not allow third-party checkout providers, so you cannot drop a custom payment rail into a Gumroad listing. This project is a tiny, self-hosted alternative storefront: list your digital products, set a price, and let buyers pay in crypto or by card. Funds settle straight to your own wallet - the storefront never touches them.
- One file storefront:
index.html+product.js. No build step. - Crypto + cards: buyers choose the coin, or pay by card through your own Stripe.
- Non-custodial: payments go to your receive addresses. No accounts to manage, no funds held.
- Client-side pay links: built straight from your publishable Store Cloud Token - safe to expose in the browser.
- Optional server route: a tracked, idempotent checkout for when you need an order record.
A Gumroad alternative for creators who want to sell ebooks, presets, music, courses, or any digital download and get paid in crypto (BTC, ETH, USDC, and many more) or by card. You bring the products and a pay.u.cash store; the storefront handles the rest.
| Gumroad | gumroad-ucashpay | |
|---|---|---|
| Payouts | USD to bank, fees per sale | Direct to your wallet, your terms |
| Crypto | Not supported | First-class |
| Cards | Yes | Yes (your own Stripe) |
| Custody | Gumroad holds balances | Non-custodial |
| Storefront | Hosted by Gumroad | Yours, one file |
- Open
index.htmlin a browser (or runnpm startfor a local server). - Click Configure token in the header and paste your pay.u.cash Store Cloud Token.
- Click Buy on any demo product. The Open checkout button opens the U.CASH Pay hosted page.
Edit the PRODUCTS array at the top of product.js to list your own products:
var PRODUCTS = [
{
id: "my-ebook",
emoji: "📖",
title: "My eBook",
desc: "A short description shown on the card.",
amount: 9,
currency: "USD"
}
];The client-side helper is exposed as window.UcashPay.buildPayLink:
const link = UcashPay.buildPayLink({
amount: 9,
title: "My eBook",
currency: "USD",
externalReference: "order_" + Date.now() // optional
});
// link -> https://pay.u.cash/embed.php?cloud=...&amount=9¤cy=USD&title=My%20eBook&...
window.location.href = link;The publishable store Cloud Token is safe to use straight from the browser - it can only start checkouts that settle to your addresses.
GET https://pay.u.cash/embed.php
?cloud=<store Cloud Token>
&amount=<number>
¤cy=<ISO 4217, default USD>
&title=<urlencoded>
&external_reference=<urlencoded, optional>
&redirect=<urlencoded, optional>
When you want a backend order record and idempotency per order, call the tracked endpoint from your own server route:
POST https://pay.u.cash/payment/ajax.php
Content-Type: application/x-www-form-urlencoded
function=create-transaction
&amount=<number>
¤cy_code=<ISO 4217>
&cryptocurrency_code= (empty string: buyer picks the coin)
&external_reference=<your unique order id>
&title=<urlencoded>
&redirect=<urlencoded, optional>
&cloud=<store Cloud Token>
&idempotent=1
Response:
{ "success": true, "response": ["https://pay.u.cash/...", "<transactionId>", ...] }The payment URL is the array element that starts with http(s)://.
A working Node example lives in server/create-checkout.js:
export UCASH_CLOUD_TOKEN="st_your_store_token"
node server/create-checkout.js
# POST { "amount": 9, "title": "My eBook", "external_reference": "order_123" } http://localhost:8787/checkout- 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 repo is a plain static storefront plus a small Node example; it is not published to any registry. To ship the server example as an npm package later:
npm version patch
npm publish --access public- No recurring billing for crypto. U.CASH Pay checkouts are one-time payments. Subscriptions would need a card token via your own Stripe, not covered here.
- Token is publishable, not secret. Anyone with the Store Cloud Token can start checkouts that settle to your addresses. They cannot move funds or read balances. Use the store-level token, not an account-wide one.
- Fulfillment is yours. This project generates the payment link. Granting downloads/licenses after a confirmed payment (via the pay.u.cash webhook) is up to your app.
MIT - see LICENSE.