Payment Provider: Alfa & JazzCash Payment Gateway (Pakistan, PK)
by Expert IT Solutions https://expertpk.com$ 137.03
Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
Discuss (mail)
|
Lines of code | 605 |
Technical Name |
eis_gateway_alpha |
License | OPL-1 |
Website | https://expertpk.com |
Versions | 17.0 18.0 |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
Discuss (mail)
|
Lines of code | 605 |
Technical Name |
eis_gateway_alpha |
License | OPL-1 |
Website | https://expertpk.com |
Versions | 17.0 18.0 |

Alfa Payment Gateway & JazzCash for Odoo
Your Ultimate Payment Solution for Pakistan with JazzCash Support
Introduction to Alfa Payment Gateway with JazzCash
Seamless Integration with Bank Alfalah and JazzCash
The Alfa Payment Gateway module for Odoo 18 now includes full support for JazzCash, Pakistan’s leading mobile wallet with over 48 million users, alongside Bank Alfalah’s robust payment gateway. This module integrates both Alfa Payment Gateway (APG) and JazzCash into Odoo, enabling businesses to accept payments securely and efficiently from customers across Pakistan. Whether your customers prefer Alfa Wallet, Bank Alfalah accounts, credit/debit cards, or JazzCash, this module offers a unified payment solution.
Setting up an Alfa merchant account is simple – register online in minutes at Bank Alfalah’s Merchant Signup. No additional configuration is needed for JazzCash; when redirected to the Alfa Payment Gateway, customers will see JazzCash as a payment option. With over 1.6 million Alfa Wallet users, 1.7 million Bank Alfalah account holders, and millions of JazzCash users, this module is the ultimate choice for e-commerce in Pakistan.
Why Choose Alfa Payment Gateway with JazzCash?
Pakistan-Focused
Leverages Bank Alfalah’s extensive user base and JazzCash’s 48M+ users for maximum reach.
Comprehensive Odoo Integration
The only Odoo module supporting Alfa Payment Gateway and JazzCash for Pakistan.
Easy Setup
Quick online registration with Bank Alfalah; no extra setup for JazzCash.
Supported Payment Methods
Flexible Options Including JazzCash
Alfa Wallet
Enable payments from 1.6M+ Alfa Wallet users with OTP validation and configurable timer.
Alfalah Bank Account
Secure payments from 1.7M+ Bank Alfalah account holders with dual OTP verification.
Credit/Debit Card
Supports Visa and Mastercard (local/international) via Alfa’s secure redirect flow.
JazzCash
Seamlessly integrated via Alfa Payment Gateway, allowing payments from 48M+ JazzCash users without additional setup.
Key Features
Enhanced Functionality for Your Business
Secure Transactions
Uses AES/CBC/PKCS7
encryption for all API requests, ensuring data protection.
Configurable OTP Timer
Customize OTP expiration (default 2 minutes) for enhanced security and user experience.
Seamless Integration
Built for Odoo 18, integrating effortlessly with Alfa and JazzCash payment flows.
Wide Reach
Access millions of Alfa Wallet, Bank Alfalah, and JazzCash users in Pakistan.
Currency Conversion (Enterprise)
Enable currency conversion in Odoo Enterprise to accept international payments in non-PKR currencies, converted to PKR.
Configuration Guide
Setting Up Alfa Payment Gateway and JazzCash
Configure the module in Odoo by entering your Alfa Payment Gateway credentials (Merchant ID, Store ID, Hash, Username, Password, Key1, Key2) in the payment provider settings. No additional setup is required for JazzCash – when customers are redirected to the Alfa Payment Gateway, they will automatically see JazzCash as a payment option alongside Alfa Wallet, Bank Account, and Credit/Debit Card.
International Payments (Odoo Enterprise)
For Odoo Enterprise users, enable the "Convert Currency to PKR" option in the payment provider settings to accept payments from international clients in non-PKR currencies. This feature automatically converts transactions to PKR using up-to-date exchange rates. Additionally, remove PKR from the supported currencies for credit/debit card payment methods to allow seamless processing of international card payments. Note: We do not recommend enabling currency conversion in Odoo Community, as it does not automatically update currency rates, which may lead to inaccurate conversions.
Steps to Enable Currency Conversion (Enterprise Only)
- Go to Odoo’s Payment Providers settings.
- Select the Alfa Payment Gateway provider.
- Check the "Convert Currency to PKR" option.
- Clear PKR from the supported currencies for credit/debit card payment methods.
- Save the settings to enable international payment processing.
Version Information
Built for Odoo 18
Current Version: 18.0.1.0.3
Released: May 2025
Compatibility: Odoo 18 Community and Enterprise editions
This module is actively maintained and supports both Alfa Payment Gateway and JazzCash. Note that it is not an official module.
Screenshots
Explore the Module in Action

Supported Payment Methods
Support Alfa Wallet, Bank Account, Credit/Debit Card, and JazzCash.

Payment Option Selection
Customers choose from Alfa Wallet, Bank Account, Credit/Debit Card, or JazzCash at checkout.

OTP with Timer
Secure OTP entry with a visible countdown timer (e.g., 2 minutes).

Card and JazzCash Redirect Flow
Redirect to Alfa’s secure page for Visa/Mastercard or JazzCash payments.

Payment Success
Confirmation page after a successful transaction.

Provider Settings
Configure APG credentials, OTP timer, and currency conversion settings.

Transaction Dashboard
Monitor all transactions, including JazzCash, with detailed status updates.
Support
We’re Here to Help
Need assistance with Alfa Payment Gateway or JazzCash integration? Contact our dedicated support team:

Send Message on WhatsApp!
Alfa Payment Gateway with JazzCash
Overview
The Alfa Payment Gateway module for Odoo 18 integrates Bank Alfalah’s payment solutions and JazzCash, Pakistan’s leading mobile wallet, enabling seamless transactions via Alfa Wallet, Alfalah Bank Account, Credit/Debit Card, and JazzCash. It supports secure payment processing with OTP validation, a configurable timer, and robust error handling, tailored for Pakistan’s e-commerce market.
Features
- Multiple Payment Methods: Supports Alfa Wallet, Alfalah Bank Account, Credit/Debit Card, and JazzCash through a unified Alfa Payment Gateway flow.
- JazzCash Integration: No additional setup required; JazzCash is available as a payment option within Alfa’s redirect flow.
- Currency Conversion (Enterprise Only): Convert non-PKR transactions to PKR for international clients (Odoo Enterprise only).
- Encryption: Uses AES/CBC/PKCS7 padding for secure API requests.
- User-Friendly: Intuitive interface with countdown timer and error feedback.
Installation
Note: Requires pycryptodome. Run pip install pycryptodome in your Python environment.
- Download the Module: Obtain from the repository or marketplace.
- Extract: Unzip to your Odoo addons directory (e.g., /path/to/odoo/addons/eis_gateway_alpha).
- Update Modules List: In Odoo, go to Apps > Update Apps List.
- Install: Search for "Alfa Payment Gateway" and click Install.
Configuration
Prerequisites
- Odoo 18 installed and running.
- Alfa Bank merchant credentials (Merchant ID, Store ID, Hash, Username, Password, Key1, Key2).
- Access to Alfa Bank’s sandbox or production API endpoints.
Steps
Configure Payment Provider: - Navigate to Settings > Payments > Payment Providers. - Click Edit for an existing provider or create a new one. - Set:
- Name: Alfa Payment Gateway
- Code: apg
- State: Test (for sandbox) or Enabled (for production)
- Merchant ID: Your Alfa Bank Merchant ID (e.g., 12345)
- Store ID: Your Alfa Bank Store ID (e.g., 012343)
- Merchant Hash: Provided by Alfa Bank (e.g., oubasf...)
- Merchant Username: Your username (e.g., providedbyalfa)
- Merchant Password: Your password (e.g., providedbyalfa...)
- Key1: Encryption key 1 (provided by alfa)
- Key2: Encryption key 2 (provided by alfa)
- OTP Expiry Time (seconds): Set to 120 (2 minutes) or your preferred value.
- Convert Currency to PKR (Enterprise only): Enable for international payments; leave unchecked for PKR-only transactions.
- Save the configuration.
Set Up Payment Methods: - Go to Payments > Payment Methods. - Ensure alfa_wallet, alfa_bank, alfa_card, and alfa_jazz_cash are linked to the APG provider. - For international payments (Enterprise only):
- Enable Convert Currency to PKR in the provider settings.
- Remove PKR from supported currencies for alfa_card to allow non-PKR card payments.
- Note: Do not enable currency conversion in Odoo Community, as it lacks automatic currency rate updates, risking inaccurate conversions.
JazzCash Configuration: - No additional setup needed. JazzCash is automatically available as a payment option when customers are redirected to Alfa’s payment page.
Test Transactions: - In test mode, use sandbox credentials to simulate payments. - Verify wallet, bank account, card, and JazzCash flows via Alfa’s redirect page.
Usage
Customer Payment Flow: - On the checkout page, select "Alfa Payment Gateway" as the payment option. - Choose a method (Alfa Wallet, Alfalah Bank Account, Credit/Debit Card, or JazzCash). - For wallet/bank:
- Enter the wallet number or account number and submit.
- Receive OTP (SMS for wallet, SMS and email for bank), enter within the timer (e.g., 2 minutes), and confirm.
- For card or JazzCash: - Redirect to Alfa Bank’s secure payment page, select JazzCash or card, complete the transaction, and return to Odoo.
International Payments (Enterprise Only): - With Convert Currency to PKR enabled, customers can pay in non-PKR currencies, automatically converted to PKR using Odoo’s updated rates. - Ensure PKR is removed from alfa_card supported currencies to process international card payments.
Admin Monitoring: - Check transaction statuses in Payments > Transactions. - View logs for debugging (e.g., handshake, OTP, JazzCash responses).
Technical Details
Architecture
- Models: - payment.provider: Extended with otp_expiry_seconds, convert_currency, and APG-specific fields. - payment.transaction: Manages transaction states and gateway data (e.g., apg_gateway_reference).
- Controllers: - /payment/apg/initiate: Initiates wallet/bank transactions. - /payment/apg/process_otp: Validates OTP submissions. - /payment/apg/callback: Handles card and JazzCash payment callbacks.
Security
- Uses AES/CBC/PKCS7 encryption with merchant-provided keys for API requests.
- OTP timer limits validation windows for enhanced security.
Customization
- Timer Adjustment: Modify otp_expiry_seconds in provider settings.
- Currency Conversion: Enable/disable convert_currency for international payments (Enterprise only).
Troubleshooting
- OTP Validation Fails: Verify merchant credentials and API connectivity.
- Currency Conversion Issues: Ensure PKR is configured and active in Odoo; use Enterprise for automatic rate updates.
- JazzCash Not Visible: Confirm Alfa merchant account is active and redirect flow is functional.
- Logs: Enable debug mode (--log-level=debug) to trace issues.
Support
For assistance with Alfa Payment Gateway or JazzCash integration, contact: - Email: support@expertpk.com - WhatsApp: +92 300 7888 120
Note
Ensure Alfa Bank API credentials are correctly configured for sandbox or production use. For international payments, use Odoo Enterprise with currency conversion enabled.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module