Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ucashpay-solid

SolidJS components and helpers for U.CASH Pay: a Pay-with-U.CASH button plus a server-side checkout helper. Accept crypto + cards. Non-custodial: funds settle direct to the merchant's wallet.

Install

npm install ucashpay-solid solid-js

Client-side button (no server needed)

The Cloud token is publishable, so you can render a pay link straight from the browser:

import { UcashPayButton } from 'ucashpay-solid';

export default function Buy() {
  return <UcashPayButton cloud="YOUR_CLOUD_TOKEN" amount="10" currency="USD" title="Pro plan" />;
}

Or build the URL yourself with hostedCheckoutUrl({ cloud, amount, currency, title, externalReference, redirectUrl }).

Server-side tracked checkout

For a transaction record + webhook, create the checkout server-side:

import { createUcashCheckout } from 'ucashpay-solid';
const r = await createUcashCheckout({ cloud: process.env.UCASH_CLOUD_TOKEN!, amount: '10', currency: 'USD', externalReference: 'order-123' });
if (r.ok) redirect(r.payment_url);

Set up your pay.u.cash account

You need a free U.CASH Pay account and a store before this can accept payments. Settlement is non-custodial: crypto goes straight to addresses you control.

  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. To also accept fiat cards, connect your own Stripe under Settings -> Payment processors.

License: MIT.

About

SolidJS components and helpers for U.CASH Pay: a Pay-with-U.CASH button + server-side checkout. Non-custodial.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages