developer
OpenCart & PrestaShop: Free UPI Payment Gateway Setup Guide (2026)
Learn how to accept direct 0% commission UPI payments on OpenCart and PrestaShop stores. Download open modules, configure webhooks, and automate order delivery.
While modern venture-backed D2C brands often flock to Shopify, thousands of established Indian manufacturing businesses, auto spare parts exporters, pharmaceutical distributors, and electronic wholesalers continue to run reliable, high-volume e-commerce storefronts on OpenCart and PrestaShop.
These mature PHP-based e-commerce engines require zero monthly cloud rental fees, handle massive product databases with ease, and can be hosted on inexpensive Linux VPS servers.
However, finding a reliable, modern payment gateway extension for OpenCart and PrestaShop that supports seamless UPI Intent, dynamic QR codes, and zero transaction commissions has historically been a major challenge.
Here is the complete setup guide for configuring direct-to-bank UPI payment modules in OpenCart and PrestaShop.
The Enduring Role of OpenCart & PrestaShop in India
For B2B wholesalers, industrial suppliers, and regional retailers, OpenCart and PrestaShop offer key advantages:
- Zero Platform Royalties: Unlike Shopify’s monthly subscriptions and 2% app ecosystem commissions, open-source PHP platforms are free forever.
- Deep Database Control: Direct access to MySQL databases allows seamless integration with legacy ERP systems like Tally Prime, Busy, or SAP Business One.
- Fast Performance on Budget VPS: A single ₹1,500/month VPS can easily handle 50,000 products and thousands of daily shoppers.
The Payment Gateway Dilemma for PHP Store Owners
When connecting an Indian payment gateway to OpenCart or PrestaShop:
- Outdated Official Plugins: Many large payment aggregators neglect their OpenCart and PrestaShop extensions, leaving unpatched PHP 8.2 compatibility bugs and broken checkout redirects.
- The 2% Margin Drain: Paying a 2% gateway commission on a ₹50,000 bulk wholesale order means losing ₹1,000 on a single transaction.
- Delayed Nodal Escrows: Holding large B2B payments in third-party aggregator escrow accounts for 48 hours restricts working capital needed for order dispatch.
By deploying VyaparGateway, wholesale and retail merchants eliminate transaction commissions and receive funds directly into their corporate bank accounts in real time.
Installing the OpenCart Direct UPI Extension
Step 1: Upload the Extension
- Download the
vyapar_upi_opencart.ocmod.zipextension. - Log into your OpenCart Admin Dashboard and navigate to Extensions > Installer.
- Upload the ZIP file and click Install.
- Go to Extensions > Modifications and click the blue Refresh button to rebuild the cache.
Step 2: Configure Module Settings
- Navigate to Extensions > Extensions > Choose “Payments”.
- Locate VyaparGateway Direct UPI and click Edit.
- Fill in the required parameters:
- Merchant UPI VPA: Your business handle (e.g.,
company@icici). - API Key & Webhook Secret: Found in your VyaparGateway portal.
- Order Status (Pending): Set to
Pending. - Order Status (Success): Set to
ProcessingorComplete. - Status: Set to
Enabled.
- Merchant UPI VPA: Your business handle (e.g.,
Configuring the PrestaShop Payment Module
- In your PrestaShop Admin Panel, navigate to Modules > Module Manager.
- Click Upload a module and select
vyaparupi.zip. - After automatic installation, click Configure.
- Enable the Dynamic QR Display and Mobile Intent Redirect options.
- Copy the automatically generated Webhook URL:
https://yourshop.com/module/vyaparupi/validationand paste it into your VyaparGateway dashboard.
Hardened PHP Webhook Verification Controller (Code)
Here is the secure PHP controller code used by the module to verify incoming bank webhook signatures and update the order state safely:
<?php
/**
* Hardened Webhook Ingestion Controller for OpenCart / PrestaShop
*/
class ControllerExtensionPaymentVyaparWebhook extends Controller {
public function index() {
if ($this->request->server['REQUEST_METHOD'] !== 'POST') {
http_response_code(405);
exit('Method Not Allowed');
}
$rawPayload = file_get_contents('php://input');
$headers = getallheaders();
$receivedSignature = isset($headers['X-Vyapar-Signature']) ? $headers['X-Vyapar-Signature'] : '';
$secretKey = $this->config->get('payment_vyapar_secret');
// 1. Verify Cryptographic HMAC Signature
$expectedSignature = hash_hmac('sha256', $rawPayload, $secretKey);
if (!hash_equals($expectedSignature, $receivedSignature)) {
http_response_code(401);
echo json_encode(['error' => 'Invalid webhook signature']);
exit;
}
$data = json_decode($rawPayload, true);
if ($data && isset($data['status']) && $data['status'] === 'SUCCESS') {
$orderId = (int)$data['orderId'];
$utrNumber = preg_replace('/[^0-9]/', '', $data['utr']);
$amountPaid = (float)$data['amount'];
$this->load->model('checkout/order');
$orderInfo = $this->model_checkout_order->getOrder($orderId);
if ($orderInfo && $orderInfo['order_status_id'] != $this->config->get('payment_vyapar_success_status_id')) {
// 2. Add Order History Comment with verified Bank UTR
$comment = sprintf(
"Direct UPI Payment Verified. Bank UTR: %s | Amount: INR %s",
$utrNumber,
number_format($amountPaid, 2)
);
$this->model_checkout_order->addOrderHistory(
$orderId,
$this->config->get('payment_vyapar_success_status_id'),
$comment,
true
);
http_response_code(200);
echo json_encode(['status' => 'ORDER_CONFIRMED', 'orderId' => $orderId]);
exit;
}
}
http_response_code(200);
echo json_encode(['status' => 'ACKNOWLEDGED']);
}
}
The Economic Impact for SMB Merchants
Monthly OpenCart / PrestaShop Turnover: ₹ 40,00,000
Legacy Gateway Commission (2% + 18% GST): ₹ 94,400 / month
VyaparGateway Flat SaaS Plan: ₹ 2,999 / month
---------------------------------------------------------
Net Working Capital Preserved: ₹ 91,401 / month
Annual Bottom-Line Profit Increase: ₹ 10,96,812 / year
By installing the VyaparGateway direct UPI module, open-source store operators eliminate middleman cuts, receive instant T+0 bank settlements, and automate their fulfillment pipelines without recurring transactional overhead.
Direct answers
Frequently asked questions
- Is there a free payment gateway module for OpenCart in India?
- Yes. VyaparGateway provides an open-source payment module for OpenCart 3.x and 4.x that allows merchants to collect UPI payments via dynamic QR codes with 0% transaction commission.
- How does PrestaShop handle order confirmation for UPI payments?
- When a customer pays via UPI, the bank webhook sends a cryptographic payload to the PrestaShop module controller (`/modules/vyaparupi/controllers/front/validation.php`), which automatically transitions the order state to 'Payment Accepted'.
- Why do self-hosted stores prefer direct UPI over Razorpay or Cashfree?
- Store owners running self-hosted OpenCart or PrestaShop prioritize low overhead. By using VyaparGateway, they avoid the standard 2% + 18% GST aggregator cut and receive settlements directly into their bank account on a real-time T+0 basis.
Build your payment flow
Explore the API and browser-only merchant tools.
Create UPI checkout orders, verify signed events, or test the free calculators and generators without exposing credentials.