Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discord-ucashpay

A Discord bot that creates U.CASH Pay checkout links (crypto + cards) on demand. Non-custodial: the link opens the hosted checkout, where the payer pays and funds settle to addresses you control.

What it does

Adds a /pay slash command:

/pay amount:10 currency:USD title:"Pro plan" external_reference:order_123

The bot replies with a hosted U.CASH Pay checkout link.

Set up

  1. Create a Discord application + bot at the Discord Developer Portal, enable the Message Content + Server Members intents as needed, and copy the bot token.
  2. Invite the bot to your server with the applications.commands + bot scopes.
  3. Set environment variables and run:
npm install
DISCORD_TOKEN=your_bot_token \
UCASH_CLOUD_TOKEN=st_your_store_cloud_token \
npm start

The bot registers /pay globally on startup.

Set up your pay.u.cash account

  1. Sign up at pay.u.cash with email + password, then click the verification link in the email.
  2. Set your receive addresses under Settings → Addresses (a wallet per coin, or ENS/Unstoppable/FIO names). Crypto settles here.
  3. Create a store at Account → Stores → + Add Store.
  4. Copy the Store Cloud Token into UCASH_CLOUD_TOKEN. Use the store-level token, not the account-wide one.

Pay-for-role (optional)

To grant a role when a payment lands, run the included webhook verifier alongside this bot (or use the n8n webhook node) and assign the role on a verified ucashpay_payment_received event. See webhook.js for a minimal HMAC verifier.

License

MIT.

About

Discord bot that creates U.CASH Pay checkout links (crypto + cards) + webhook verifier for pay-for-role. Non-custodial.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages