self-hosted payment gateway software

Routing South Asian and global payment gateways in a single self-hosted checkout

A guide to pairing regional gateways like bKash and SSLCommerz with global processors to lower checkout abandonment in emerging markets.

By Aria Channing·September 12, 2026·3 min read
What matters here
  1. Offering local South Asian wallets alongside credit cards prevents checkout drop-off in emerging markets.
  2. Self-hosted plugins let developers isolate gateway API credentials without modifying core application code.
  3. Double-entry bookkeeping keeps multi-gateway transactions reconciled across currencies and payment providers.

The South Asian Payment Bottleneck

Expanding e-commerce into South Asia presents a clear challenge. International card networks like Stripe handle global credit cards, but domestic buyers often rely on regional mobile financial services and local gateways. If your checkout only accepts standard credit cards, buyers in markets like Bangladesh drop out when they cannot pay with bKash, Nagad, or SSLCommerz.

Solving this does not require building separate checkout flows for every region. Running a unified, self-hosted payment gateway gives you direct control over your checkout experience. When deciding between third-party processors, custom engineering, or independent hosting, our previous analysis on comparing payment stacks: SaaS, custom builds, and self-hosted engines highlights how maintaining data custody and avoiding per-transaction platform fees gives merchants long-term flexibility.

This guide walks through configuring local South Asian payment methods alongside global credit card processors inside OwnPay on a single server setup.

Step 1: Deploying the Core Gateway Engine

OwnPay is an open-source payment gateway engine licensed under the AGPL. It runs on standard PHP server environments. Setting up the base instance takes under five minutes.

  • Download the release files and drop them onto your PHP server.
  • Point your web host or domain to the installation directory.
  • Ensure your PHP runtime and database satisfy standard environment requirements.

Because OwnPay takes a 0% platform fee on transactions, every dollar processed flows directly to your payment provider accounts. Once installed, the administration dashboard allows you to manage plugins, configure credentials, and monitor transaction ledgers.

Step 2: Installing Gateway Plugins

OwnPay isolates payment integrations into modular plugins using an action and filter hook pattern. You do not modify core application code to add new payment providers. Installing regional gateway plugins allows you to run regional payment gateway integration options like bKash, Nagad, and SSLCommerz alongside global options like Stripe or PayPal.

Configuring Global Processors

To configure Stripe, navigate to the plugin catalog in your dashboard. Input your API keys. This handles standard debit and credit card checkouts for international customers. The plugin handles charge authorization and settlement events automatically.

Adding Regional South Asian Gateways

To capture regional traffic, install the plugins for bKash, Nagad, or SSLCommerz. Each regional provider requires its own credentials, such as merchant IDs and secret keys.

  • bKash and Nagad: Configure the API keys provided by the mobile financial service providers. These handle direct mobile wallet transfers across Bangladesh.
  • SSLCommerz: Enter your SSLCommerz credentials. This opens support for local bank transfers, regional cards, and domestic digital payment channels.

Each plugin isolates its credentials in your database on your own server. Customer payment details remain on your infrastructure, ensuring data privacy.

Step 3: Unifying the White-Label Checkout

Having multiple payment gateways does not mean presenting a fragmented user experience. OwnPay offers a white-label checkout on your own domain. Customers see your logo, your colors, and your domain without platform branding.

When a buyer reaches checkout, the engine exposes active payment methods based on your configuration. A customer in Dhaka can select bKash, Nagad, or SSLCommerz to pay in local currency. An international customer can select Stripe to pay in USD. The entire transaction executes under your domain's SSL certificate.

Step 4: Managing Ledgers and Webhooks

Processing payments across different currencies and gateway structures requires strict accounting. OwnPay uses double-entry bookkeeping to maintain ledger balance. Every completed transaction generates matching ledger entries automatically. A payment records a debit to customer receivables and a credit to merchant revenue.

When a payment completes across any configured gateway—whether via Stripe or bKash—OwnPay fires event hooks. You can attach custom business logic to these events without touching core files. For details on handling post-payment logic and dispatching webhooks, see our guide on how to write custom post-payment hooks in OwnPay.

Developer teams can listen for payment completion events using the WordPress-style hook system:

Hook::on('payment.completed', function ($trx) { Notification::send($trx->merchant, $trx); });

Signed HMAC webhooks can also inform your fulfillment backend, mobile app, or external systems. The system exposes REST API endpoints, such as retrieving payment states via GET /api/v1/payments/{payment_id}.

Reducing Abandonment with Regional Routing

Checkout abandonment drops when payment friction disappears. Providing local payment methods alongside established global options removes geographic barriers for buyers in emerging markets. By self-hosting your payment infrastructure with OwnPay, you eliminate platform fees, retain ownership of customer data, and deliver localized checkout experiences worldwide.

More from OwnPay News