A lightweight Discord bot that integrates Payhip with Discord to deliver real-time sales, refund, and subscription notifications. Receive beautifully formatted embeds with product details, coupon tracking, and multi-item purchase support directly in your Discord channels. Built with Node.js and discord.js, this bot makes tracking your Payhip sales effortless.
- Clone the repository:
git clone https://github.com/Redon-Tech/integrations-bot.git
cd integrations-bot- Install dependencies:
npm install- Copy and edit config files:
cp src/config/template.config.json src/config/config.json
cp src/config/.env.template src/config/.env- Edit
src/config/config.jsonfor channel IDs, webhook config, and other settings. - Edit
src/config/.envfor your Discord bot token and client ID.
- Run the bot:
node src/bot/Handler.jsOr use PM2 for production. 5. Invite the bot to your server:
- Use the OAuth2 URL from the Discord Developer Portal with
botandapplications.commandsscopes.
For full details, see the Installation & First Run Guide.
- Real-time Notifications: Instant Discord notifications for Payhip sales, refunds, and subscriptions
- Rich Embeds: Beautifully formatted sale information including:
- Product names (with sale indicators)
- Total price and currency
- Payment method
- Coupon usage and savings
- Transaction IDs
- VAT status
- Multi-Product Support: Handles single and multi-item purchases
- Configurable: JSON-based configuration for channels, hex colors, and webhook settings
- Live Config Reload: Change config from Discord without restarting the bot
- SQL Database: All sales, refunds, and subscriptions tracked in SQLite with external SQL files
- Logging: Comprehensive logging with timestamps and error tracking
- Admin Tools: Slash commands for config, stats, and options
/sales— View recent sales/stats— View sales statistics/config— Configure bot settings (admin only, live reload)/configoptions— View available config keys for a section/test— Send test webhook notification/help— Display available commands/botinfo— Displays information about the bot
- Multi-Tenant Support (future):
- Multiple Payhip accounts per bot instance
- Per-tenant webhook endpoints and Discord channel routing
- Tenant-specific configuration management
- Web Dashboard (future):
- Real-time sales monitoring
- Analytics and reporting
- Configuration management UI
- Webhook endpoint management
- Bot status and health monitoring
- Basic webhook receiver (Express server)
- Discord bot foundation with event handling
- Sales/refund/subscription notification embeds
- Coupon/discount tracking
- Logging system with daily log files
- Environment-based configuration
- SQL-based database with external schema and query files
- Config command with live reload (no restart required)
- Admin tools for config and stats
- Multi-tenant support
- Web dashboard