Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

podia-ucashpay

Add a Pay with U.CASH button to Podia using Podia's custom code feature. Accept crypto (and, if you connect your own Stripe, cards) for external offers, downloads, coaching, or tips. Non-custodial: every checkout is hosted on pay.u.cash and funds settle directly to your own receive addresses. This package never holds your customer's money or your private wallet keys.

  • Drop-in button for Podia custom <head> / page code.
  • One publishable store token, safe to expose in the browser.
  • Open checkout in a new tab or a modal overlay.
  • Optional Node server helper to create a tracked (idempotent) checkout.

How it works

Podia page  ->  ucashpay-button.js  ->  pay.u.cash/embed.php  ->  your wallets

The button builds a link to https://pay.u.cash/embed.php?cloud=...&amount=... and sends the customer there. pay.u.cash renders the wallet / card flow and credits the configured receive addresses. The Store Cloud Token is a publishable key (like a Stripe publishable key): it can only open a checkout, it cannot move funds or read balances.

Quick start (client only, no server)

  1. Put ucashpay-button.js somewhere Podia can load it (a GitHub raw/jsDelivr URL, or upload to your own host). The simplest option is jsDelivr:

    https://cdn.jsdelivr.net/gh/UdotCASH/podia-ucashpay@v0.1.0/ucashpay-button.js
    
  2. In Podia, open Site settings -> Code and paste into Custom code for the <head> tag:

    <script src="https://cdn.jsdelivr.net/gh/UdotCASH/podia-ucashpay@v0.1.0/ucashpay-button.js" defer></script>
  3. On any Podia page (or in a custom code block), add a button element:

    <button
      data-ucashpay="YOUR_STORE_CLOUD_TOKEN"
      data-amount="25.00"
      data-currency="USD"
      data-title="Premium Download"
      data-external-reference="premium-download"
      data-open-mode="modal">
      Pay with U.CASH
    </button>
  4. Save and publish. Clicking the button opens the U.CASH checkout.

The library auto-mounts any element matching [data-ucashpay], button.ucashpay, a.ucashpay, or [data-ucashpay-button], and re-scans on Podia SPA navigations, so you can add buttons in plain HTML blocks.

Button data attributes

Attribute Required Description
data-ucashpay yes Your Store Cloud Token (publishable).
data-amount yes Amount to charge, e.g. 25.00.
data-currency no ISO currency, defaults to USD.
data-title no Shown on the checkout page. Defaults to the button text.
data-external-reference no Your order / reference id (idempotent key server-side).
data-redirect no Where to send the customer after payment. Defaults to this page.
data-open-mode no tab (default) opens a new tab; modal opens an inline overlay.
data-ucashpay-style no none to disable the default gold button styling.

You can also call it from your own JS:

<script>
  UcashPayButton.openCheckout({
    cloud: "YOUR_STORE_CLOUD_TOKEN",
    amount: "10.00",
    currency: "USD",
    title: "Tip",
    externalReference: "tip-" + Date.now()
  }, "modal");
</script>

Set up your pay.u.cash account

  1. Sign up at pay.u.cash, then click the verification link in the email.
  2. Set receive addresses under Settings -> Addresses (raw address, ENS, Unstoppable Domains, or FIO).
  3. Create a store under Account -> Stores and copy its Store Cloud Token (use the store-level token, not the account-wide one).
  4. For fiat cards, connect your own Stripe under Settings -> Payment processors.

Optional: tracked checkout from a server

If you want a server record and idempotency before redirecting, call pay.u.cash from a small Node route (Netlify / Vercel / Lambda / Express). See server/create-checkout.example.js.

const { createCheckout } = require("./server/create-checkout.example.js");

createCheckout({
  cloud: process.env.UCASH_CLOUD_TOKEN,
  amount: "25.00",
  currencyCode: "USD",
  title: "Premium Download",
  externalReference: "podia-order-123",
  redirect: "https://yourstore.podia.com/thanks"
}).then(out => console.log(out.paymentUrl));

Request:

POST https://pay.u.cash/payment/ajax.php
Content-Type: application/x-www-form-urlencoded

function=create-transaction&amount=25.00&currency_code=USD&cryptocurrency_code=
&external_reference=podia-order-123&title=Premium+Download
&redirect=https://yourstore.podia.com/thanks&cloud=YOUR_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)://. The request is idempotent per external_reference, so retries return the same checkout.

You can host ucashpay-button.js anywhere. If you also want it on npm under your own scope, run from the repo root:

npm publish --access public

Limitations (honest notes)

  • No native Podia checkout replacement. Podia's built-in product checkout is closed; this integration runs alongside it via custom code. Use it for external offers, downloads, coaching links, and tips. It does not replace the Podia order object or sales dashboard for those items.
  • No automatic recurring crypto billing. U.CASH crypto payments are one-time. For memberships, the customer pays each cycle, or you connect your own Stripe under Settings -> Payment processors for card subscriptions.
  • Card payments need your own Stripe. Connect it on pay.u.cash; this package does not store card details. Crypto is non-custodial by default.

Security

  • The Store Cloud Token is publishable and safe in the browser, like a Stripe publishable key. It can only open a checkout.
  • Funds settle directly to the receive addresses you configure on pay.u.cash. This library and pay.u.cash never hold your customer's funds for crypto.
  • Never put account-wide credentials or private wallet keys in Podia custom code.
  • If you use the server helper, keep it behind your own auth and expose only the resulting payment URL to the client.

Files

  • ucashpay-button.js - the drop-in button library.
  • server/create-checkout.example.js - optional Node helper for a tracked checkout (idempotent per external_reference).
  • podia-head-snippet.html - copy/paste starter for Podia custom code.

License

MIT (c) 2026 U.CASH

About

Add a Pay-with-U.CASH button to Podia via custom code. Non-custodial.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages