# abhishekmishra9051/getway architecture

> Architecture diagram of the GitHub repository abhishekmishra9051/getway, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abhishekmishra9051/getway
- Repository: https://github.com/abhishekmishra9051/getway

## Overview

UPI Gateway is a self-hosted, multi-merchant UPI payment platform. Its main flow is merchant API or hosted-checkout order creation, payment-account selection and UPI payment, followed by automated or manual verification and webhook notification. The map also captures account management, administration, sandbox use, and browser installation. Relationships are limited to README-documented behavior and source-index references or excerpts; several controller and routing details were not sampled, so their internal call paths are not asserted.

Main entry points: [`app/Services/OrderService.php`](https://github.com/abhishekmishra9051/getway/blob/main/app/Services/OrderService.php) (Order Service), [`app/Http/Controllers/Admin/TransactionDebuggerController.php`](https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Controllers/Admin/TransactionDebuggerController.php) (Transaction Debugger), [`app/Http/Controllers/Api/OrderApiController.php`](https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Controllers/Api/OrderApiController.php) (Order API), [`app/Services/WebhookOutboxService.php`](https://github.com/abhishekmishra9051/getway/blob/main/app/Services/WebhookOutboxService.php) (Webhook Outbox)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_payments["Payments"]
  node_order_api["Order API"]
  node_checkout["Hosted Checkout"]
  node_orders["Order Service<br/>[OrderService.php]"]
  node_order_data[("Orders<br/>[Order.php]")]
end

subgraph group_verification["Verification"]
  node_verification["Payment Verification<br/>[OrderService.php]"]
  node_verifiers["Provider Verifiers"]
  node_manual_review["Manual UTR Review<br/>[ManualVerifier.php]"]
end

subgraph group_webhooks["Webhooks"]
  node_outbox_service["Webhook Outbox"]
  node_outbox_data[("Webhook Events<br/>[WebhookOutbox.php]")]
  node_webhook_job["Webhook Delivery<br/>[SendWebhook.php]"]
  node_history["Webhook History"]
end

subgraph group_merchant_admin["Merchant and Admin"]
  node_account_mgmt["Account Management"]
  node_accounts[("Payment Accounts<br/>[PaymentAccount.php]")]
  node_merchant_ui["Merchant Dashboard"]
  node_admin_ui["Admin Console"]
  node_transaction_debug["Transaction Debugger"]
end

subgraph group_platform["Platform"]
  node_api_auth["API Authentication"]
  node_installer["Browser Installer"]
  node_install_manager["Installation Manager"]
end

node_merchant(("Merchant"))

node_merchant -->|"submits orders"| node_order_api
node_merchant -->|"pays through"| node_checkout
node_order_api -->|"creates or checks"| node_orders
node_orders -->|"persists orders"| node_order_data
node_orders -->|"selects accounts"| node_accounts
node_merchant -->|"manages accounts"| node_account_mgmt
node_account_mgmt -.->|"maintains accounts"| node_accounts
node_merchant -->|"manages payments"| node_merchant_ui
node_admin_ui -->|"reviews activity"| node_orders
node_transaction_debug -->|"loads webhook history"| node_history
node_transaction_debug -->|"inspects orders"| node_order_data
node_orders -->|"checks payments"| node_verification
node_verification -.->|"uses provider checks"| node_verifiers
node_verification -.->|"supports UTR review"| node_manual_review
node_verification -->|"queues notifications"| node_outbox_service
node_outbox_service -.->|"records events"| node_outbox_data
node_outbox_data -.->|"drives delivery"| node_webhook_job
node_webhook_job -->|"records delivery"| node_history
node_merchant -->|"authenticates API"| node_api_auth
node_installer -->|"runs setup"| node_install_manager

click node_order_api "https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Controllers/Api/OrderApiController.php"
click node_checkout "https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Controllers/CheckoutController.php"
click node_orders "https://github.com/abhishekmishra9051/getway/blob/main/app/Services/OrderService.php"
click node_order_data "https://github.com/abhishekmishra9051/getway/blob/main/app/Models/Order.php"
click node_account_mgmt "https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Controllers/PaymentAccountController.php"
click node_accounts "https://github.com/abhishekmishra9051/getway/blob/main/app/Models/PaymentAccount.php"
click node_merchant_ui "https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Controllers/OrderController.php"
click node_admin_ui "https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Controllers/Admin/AdminController.php"
click node_transaction_debug "https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Controllers/Admin/TransactionDebuggerController.php"
click node_verification "https://github.com/abhishekmishra9051/getway/blob/main/app/Services/OrderService.php"
click node_verifiers "https://github.com/abhishekmishra9051/getway/tree/main/app/Services/Verifiers"
click node_manual_review "https://github.com/abhishekmishra9051/getway/blob/main/app/Services/Verifiers/ManualVerifier.php"
click node_outbox_service "https://github.com/abhishekmishra9051/getway/blob/main/app/Services/WebhookOutboxService.php"
click node_outbox_data "https://github.com/abhishekmishra9051/getway/blob/main/app/Models/WebhookOutbox.php"
click node_webhook_job "https://github.com/abhishekmishra9051/getway/blob/main/app/Jobs/SendWebhook.php"
click node_history "https://github.com/abhishekmishra9051/getway/blob/main/app/Services/WebhookHistoryService.php"
click node_api_auth "https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Middleware/AuthenticateApiKey.php"
click node_installer "https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Controllers/InstallController.php"
click node_install_manager "https://github.com/abhishekmishra9051/getway/blob/main/app/Support/InstallationManager.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_order_api,node_checkout,node_orders,node_order_data toneBlue
class node_verification,node_verifiers,node_manual_review toneAmber
class node_outbox_service,node_outbox_data,node_webhook_job,node_history toneMint
class node_account_mgmt,node_accounts,node_merchant_ui,node_admin_ui,node_transaction_debug toneRose
class node_api_auth,node_installer,node_install_manager,node_merchant toneIndigo
```

## Components

### Payments

- [Order API](https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Controllers/Api/OrderApiController.php): `app/Http/Controllers/Api/OrderApiController.php`
- [Hosted Checkout](https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Controllers/CheckoutController.php): `app/Http/Controllers/CheckoutController.php`
- [Order Service](https://github.com/abhishekmishra9051/getway/blob/main/app/Services/OrderService.php): `app/Services/OrderService.php`
- [Orders](https://github.com/abhishekmishra9051/getway/blob/main/app/Models/Order.php): `app/Models/Order.php`

### Verification

- [Payment Verification](https://github.com/abhishekmishra9051/getway/blob/main/app/Services/OrderService.php): `app/Services/OrderService.php`
- [Provider Verifiers](https://github.com/abhishekmishra9051/getway/tree/main/app/Services/Verifiers): `app/Services/Verifiers`
- [Manual UTR Review](https://github.com/abhishekmishra9051/getway/blob/main/app/Services/Verifiers/ManualVerifier.php): `app/Services/Verifiers/ManualVerifier.php`

### Webhooks

- [Webhook Outbox](https://github.com/abhishekmishra9051/getway/blob/main/app/Services/WebhookOutboxService.php): `app/Services/WebhookOutboxService.php`
- [Webhook Events](https://github.com/abhishekmishra9051/getway/blob/main/app/Models/WebhookOutbox.php): `app/Models/WebhookOutbox.php`
- [Webhook Delivery](https://github.com/abhishekmishra9051/getway/blob/main/app/Jobs/SendWebhook.php): `app/Jobs/SendWebhook.php`
- [Webhook History](https://github.com/abhishekmishra9051/getway/blob/main/app/Services/WebhookHistoryService.php): `app/Services/WebhookHistoryService.php`

### Merchant and Admin

- [Account Management](https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Controllers/PaymentAccountController.php): `app/Http/Controllers/PaymentAccountController.php`
- [Payment Accounts](https://github.com/abhishekmishra9051/getway/blob/main/app/Models/PaymentAccount.php): `app/Models/PaymentAccount.php`
- [Merchant Dashboard](https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Controllers/OrderController.php): `app/Http/Controllers/OrderController.php`
- [Admin Console](https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Controllers/Admin/AdminController.php): `app/Http/Controllers/Admin/AdminController.php`
- [Transaction Debugger](https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Controllers/Admin/TransactionDebuggerController.php): `app/Http/Controllers/Admin/TransactionDebuggerController.php`

### Platform

- [API Authentication](https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Middleware/AuthenticateApiKey.php): `app/Http/Middleware/AuthenticateApiKey.php`
- [Browser Installer](https://github.com/abhishekmishra9051/getway/blob/main/app/Http/Controllers/InstallController.php): `app/Http/Controllers/InstallController.php`
- [Installation Manager](https://github.com/abhishekmishra9051/getway/blob/main/app/Support/InstallationManager.php): `app/Support/InstallationManager.php`

### Other components

- **Merchant**

## Connections

- Merchant → Order API: submits orders (evidence: `README.md`)
- Merchant → Hosted Checkout: pays through (evidence: `README.md`)
- Order API → Order Service: creates or checks (evidence: `app/Http/Controllers/Api/OrderApiController.php`)
- Order Service → Orders: persists orders (evidence: `app/Services/OrderService.php`)
- Order Service → Payment Accounts: selects accounts (evidence: `app/Services/OrderService.php`)
- Merchant → Account Management: manages accounts (evidence: `README.md`)
- Account Management → Payment Accounts: maintains accounts
- Merchant → Merchant Dashboard: manages payments (evidence: `README.md`)
- Admin Console → Order Service: reviews activity (evidence: `app/Http/Controllers/Admin/AdminController.php`)
- Transaction Debugger → Webhook History: loads webhook history (evidence: `app/Http/Controllers/Admin/TransactionDebuggerController.php`)
- Transaction Debugger → Orders: inspects orders (evidence: `app/Http/Controllers/Admin/TransactionDebuggerController.php`)
- Order Service → Payment Verification: checks payments (evidence: `README.md`)
- Payment Verification → Provider Verifiers: uses provider checks (evidence: `app/Services/OrderService.php`)
- Payment Verification → Manual UTR Review: supports UTR review
- Payment Verification → Webhook Outbox: queues notifications (evidence: `app/Services/OrderService.php`)
- Webhook Outbox → Webhook Events: records events
- Webhook Events → Webhook Delivery: drives delivery (evidence: `app/Jobs/SendWebhook.php`)
- Webhook Delivery → Webhook History: records delivery (evidence: `app/Jobs/SendWebhook.php`)
- Merchant → API Authentication: authenticates API (evidence: `README.md`)
- Browser Installer → Installation Manager: runs setup (evidence: `app/Http/Controllers/InstallController.php`)
