This project follows semantic versioning. See the badge above for the latest release.
PGBridge-Go is a lightweight, production-ready payment gateway bridge built with Go. It provides a simple, secure, and extensible way to integrate with payment providers, handle payment notifications, and manage payment flows. The project is containerized with Docker and includes a modern logging system, QR code generation, and a clean HTML UI for payment callbacks.
- ⚡ Fast and efficient Go backend (Fiber framework)
- 🔒 Secure authentication and payment flow
- 📦 Dockerized for easy deployment
- 📝 Structured logging with Zap
- 📄 Swagger UI for API documentation
- 🖼️ QR code generation for payment links
- 📬 Webhook/callback handling
- 🧩 Modular code structure for easy extension
- ✅ Midtrans
- ⏳ Xendit, DOKU, iPaymu, and more gateways coming soon (in progress)
- Backend: Go (Fiber)
- Logging: Zap
- API Docs: Swagger UI
- Containerization: Docker, Docker Compose
- Web Server: Nginx (for static/docs)
- Database: (Pluggable, add your own in
/src/database) - QR Code: github.com/skip2/go-qrcode
.
├── src/
│ ├── main.go # Entry point
│ ├── controllers/ # Business logic (auth, payment, callbacks, etc.)
│ ├── helper/ # Utility functions (auth, QR, etc.)
│ ├── logger/ # Zap logger setup
│ ├── models/ # Data models
│ ├── routes/ # API routes
│ ├── views/ # HTML templates
│ ├── config/ # Configuration
│ └── ...
├── nginx/ # Nginx config for static/docs
├── swagger/ # Swagger UI and OpenAPI spec
├── docker-compose.yaml
├── README.md
└── LICENSE
- Go 1.18+
- Docker (optional, for containerized production)
- Docker Compose (optional)
- Copy
.env.exampleto.envand adjust as needed. - Install Go dependencies:
go mod download
- Run the application:
or, for hot reload during development:
go run main.go
CompileDaemon --command="go run main.go" - The backend will be available at
http://localhost:5000.
Use the Docker Compose file in the root folder for development:
docker-compose up --buildThe backend will be available at http://localhost:5000.
The production Docker Compose file is located in the src/ folder:
cd src
docker-compose up --buildThe backend will be available at http://localhost:5000.
Swagger UI is available at:
http://localhost:8080/swagger/
Copy .env.example to .env and adjust as needed.
- Hot reload is enabled via CompileDaemon.
- Logs are written to
src/app.log.
This project is licensed under the MIT License.
Made with ❤️ by Gusde Widnyana