How mynkdev-21/upi-gateway works
UPI Gateway is a self-hosted multi-merchant payment platform. Merchants create Live or Sandbox orders through the API or dashboard; orders select a compatible account, present hosted checkout or UPI payment, undergo provider or manual verification, and produce signed webhook notifications. Merchant account and administration features, webhook history/retention, and browser installation are also represented. Relationships are limited to calls and setup wiring shown in excerpts, the source index, or README; several controller and integration paths are tree-supported but unsampled.
Main entry points: OrderService.php Order orchestration · OrderApiController.php Merchant API · app.php Web runtime · SendWebhook.php Webhook sender
Components 30
Application entry
- Merchant API
app/Http/Controllers/Api/OrderApiController.php - Web runtime
bootstrap/app.php - API key auth
app/Http/Middleware/AuthenticateApiKey.php
Merchant operations
- Account management
app/Http/Controllers/PaymentAccountController.php - Payment accounts
app/Models/PaymentAccount.php - Merchant identity
app/Models/User.php - Order dashboard
app/Http/Controllers/OrderController.php - Order API
app/Http/Controllers/Api/OrderApiController.php
Payment lifecycle
- Order orchestration
app/Services/OrderService.php - Orders
app/Models/Order.php - Checkout
app/Http/Controllers/CheckoutController.php - Sandbox checkout
app/Http/Controllers/SandboxCheckoutController.php - Payment verification
app/Services/Verifiers
Webhook delivery
- Webhook event creation
app/Services/WebhookOutboxService.php - Webhook outbox
app/Models/WebhookOutbox.php - Webhook dispatch
app/Services/WebhookOutboxDispatcher.php - Webhook sender
app/Jobs/SendWebhook.php - Webhook history
app/Services/WebhookHistoryService.php - Delivery logs
app/Models/WebhookLog.php
Administration and setup
- Admin dashboard
app/Http/Controllers/Admin/AdminController.php - Transaction debugger
app/Http/Controllers/Admin/TransactionDebuggerController.php - Admin audit
app/Models/AdminAuditLog.php - Webhook retention
app/Services/WebhookRetentionService.php - Browser installer
app/Http/Controllers/InstallController.php - Installation manager
app/Support/InstallationManager.php - Deployment URL
app/Support/DeploymentUrl.php
Other components
- Merchant
- Payer
- Payment providers
- Merchant endpoint
Connections 32
- Merchant → Web runtime: uses
- Web runtime → API key auth: registers middleware
bootstrap/app.php - Merchant → Merchant API: creates orders
- Merchant API → Order orchestration: delegates
app/Http/Controllers/Api/OrderApiController.php - Merchant API → Merchant identity: authenticates
app/Http/Controllers/Api/OrderApiController.php - Merchant → Account management: manages accounts
- Account management → Payment accounts: manages
- Merchant → Order dashboard: tracks orders
- Order dashboard → Order orchestration: delegates
- Order orchestration → Payment accounts: selects account
app/Services/OrderService.php - Order orchestration → Orders: creates and checks
app/Services/OrderService.php - Order orchestration → Payment verification: runs verifier
app/Services/OrderService.php - Payer → Checkout: pays
- Checkout → Order orchestration: checks payment
- Payer → Sandbox checkout: tests payment
- Sandbox checkout → Order orchestration: uses
- Payment verification → Payment providers: verifies with
- Order orchestration → Webhook event creation: records events
app/Services/OrderService.php - Webhook event creation → Webhook outbox: writes events
- Webhook dispatch → Webhook outbox: claims events
- Webhook dispatch → Webhook sender: dispatches job
- Webhook sender → Merchant endpoint: sends signed webhook
app/Jobs/SendWebhook.php - Webhook sender → Delivery logs: records delivery
app/Jobs/SendWebhook.php - Transaction debugger → Webhook history: loads history
app/Http/Controllers/Admin/TransactionDebuggerController.php - Webhook history → Delivery logs: reads delivery history
app/Services/WebhookHistoryService.php - Admin dashboard → Order orchestration: uses order service
app/Http/Controllers/Admin/AdminController.php - Admin dashboard → Admin audit: writes audit
app/Http/Controllers/Admin/AdminController.php - Transaction debugger → Admin audit: writes audit
app/Http/Controllers/Admin/TransactionDebuggerController.php - Webhook retention → Delivery logs: archives logs
- Browser installer → Installation manager: runs setup
app/Http/Controllers/InstallController.php - Browser installer → Deployment URL: uses URL config
app/Http/Controllers/InstallController.php - Web runtime → Browser installer: routes requests
bootstrap/app.php