A webhook handler for Wise events that forwards notifications to Discord with formatted embeds.
- Express.js server setup
- Wise webhook handling
- Discord webhook integration
- Formatted embeds for different event types:
- Transfer state changes
- Transfer payout failures
- Balance credits
- Unknown events
- Error handling with separate error webhook
- Security middleware (Helmet)
- CORS enabled
- Request logging (Morgan)
- Environment variables support
- Node.js (v14 or higher)
- npm or yarn
- Discord webhook URLs
- Clone the repository
- Install dependencies:
npm install- Copy
.env.exampleto.envand fill in your Discord webhook URLs:
cp .env.example .envCreate a .env file in the root directory with the following variables:
PORT=3000
NODE_ENV=development
DISCORD_WEBHOOK_URL=your_discord_webhook_url_here
DISCORD_ERROR_WEBHOOK_URL=your_discord_error_webhook_url_here
Development mode:
npm run devProduction mode:
npm startReceives Wise webhook events and forwards them to Discord.
Supported event types:
transfers#state-changetransfers#payout-failurebalances#credit- Unknown events (sends raw payload)
Health check endpoint.
.
├── src/
│ ├── app.js
│ └── utils/
│ └── discord.js
├── .env
├── .env.example
├── package.json
└── README.md
- All errors are logged to the console
- Errors are sent to a separate Discord webhook for monitoring
- Unknown event types are handled gracefully with raw payload display
AGPL-3