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.
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.
- Create a Discord application + bot at the Discord Developer Portal, enable the Message Content + Server Members intents as needed, and copy the bot token.
- Invite the bot to your server with the
applications.commands+botscopes. - Set environment variables and run:
npm install
DISCORD_TOKEN=your_bot_token \
UCASH_CLOUD_TOKEN=st_your_store_cloud_token \
npm startThe bot registers /pay globally on startup.
- Sign up at pay.u.cash with email + password, then click the verification link in the email.
- Set your receive addresses under Settings → Addresses (a wallet per coin, or ENS/Unstoppable/FIO names). Crypto settles here.
- Create a store at Account → Stores → + Add Store.
- Copy the Store Cloud Token into
UCASH_CLOUD_TOKEN. Use the store-level token, not the account-wide one.
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.
MIT.