Welcome to the Webhook Sandbox repository. This is a powerful, standalone local development tool designed to help developers simulate and test webhooks (like Payment Gateway success/failure callbacks) entirely on localhost without needing internet exposure or tunneling tools like ngrok.
- Standalone Executable: Built with Go and
go:embed, the entire application (Backend + Frontend) runs as a single.exefile with zero external dependencies. - Local Webhook Simulation: Easily simulate complex third-party callbacks (e.g., PayHere, Stripe) directly to your local backend API (Spring Boot, Node.js, etc.).
- Dynamic Scenarios: Test different edge cases instantly by toggling between
SUCCESS,FAILED, andPENDINGpayment statuses. - Persistent History: Automatically logs all sent webhooks and their target HTTP status codes, saving them locally so you never lose your testing history.
- Modern UI/UX: A clean, responsive interface built with React, featuring glassmorphism design, floating input labels, and dynamic color-coded status indicators.
- Auto-Launch & Graceful Shutdown: Automatically opens the default web browser upon startup and includes a safe shutdown mechanism directly from the UI.
-
Core Engine (Backend): Go (Golang)
-
Frontend Framework: React.js (TypeScript) via Vite
-
Styling: Custom CSS (Glassmorphism & Modern Animations)
-
Packaging Tooling:
go:embed(File bundling),go-winres(Executable icon embedding)
sequenceDiagram
autonumber
participant U as User (React UI)
participant S as Sandbox Engine (Go :3000)
participant T as Target API (Your Backend)
U->>S: POST /api/send (Order, Amount, Custom JSON)
activate S
Note over S: Parses Payload & Extracts Target URL
S->>T: POST Application/JSON (Webhook Data)
activate T
Note over T: Your Backend processes the mock payment
T-->>S: HTTP Status (e.g., 200 OK / 500 Error)
deactivate T
S-->>U: Return Success/Fail State
deactivate S
U->>U: Update Dashboard History
You can run the Webhook Sandbox either by downloading the pre-compiled executable or by building it from the source.
- Go to the Releases tab of this repository.
- Download the latest
webhook-sandbox.exefile. - Double-click the file to run. It will automatically open the dashboard in your default browser at
http://localhost:3000.
Follow these steps to compile the tool yourself. Ensure you have Go and Node.js installed on your machine. Run the following commands sequentially in your terminal:
# 1. Clone the repository
git clone https://github.com/shan2003034/webhook-sandbox
cd webhook-sandbox
# 2. Build the React Frontend
cd frontend
npm install
npm run build
cd ..
# 3. Compile the Go Executable (To include a custom icon on Windows, run 'go-winres make' before building)
go build -a -o webhook-sandbox.exe main.go4. Run the Application Execute the generated webhook-sandbox.exe file to start the sandbox environment.
👨💻 Author Prasanna Lakshan
🌐 Portfolio: https://prasanna-lakshan.vercel.app/
💼 LinkedIn: https://www.linkedin.com/in/prasannalakshan
💻 GitHub: https://github.com/shan2003034


