Monetizing mobile applications in Pakistan has always posed unique hurdles. While global developers rely heavily on Google Play In-App Billing or Stripe, a vast majority of Pakistani consumers do not possess international credit or debit cards. Instead, mobile wallets such as JazzCash, EasyPaisa, SadaPay, and NayaPay dominate over 85% of domestic transactions.

In this comprehensive tutorial, you will learn how to integrate the Pak Payment Gateway Ultra extension (.aix) into your Kodular, MIT App Inventor, or Niotron projects. You will be able to accept instant digital payments, verify transaction IDs automatically, and grant users premium access without manual approvals.

1. Key Features of Pak Payment Gateway Ultra

Pak Payment Gateway Ultra (.aix)

Official Version 1.0 • Built for Kodular, App Inventor & Niotron

🛒 Get Extension ($15 / Rs 4500)

2. Importing the Extension into Kodular

  1. Open your project dashboard on Kodular Creator.
  2. Navigate to the left-hand palette and scroll down to the Extensions drawer.
  3. Click on Import Extension and select PakPaymentGatewayUltra.aix from your computer.
  4. Drag and drop the PakPaymentGateway component from the palette onto Screen1 (it is a non-visible component).

3. Setting Up Merchant Credentials in Properties

Select the component in the designer view to configure your wallet receiver numbers and merchant details:

ReceiverJazzCashNumber = "03001234567" ReceiverEasyPaisaNumber = "03441234567" ReceiverBankTitle = "Abid Ali Bhatti" ReceiverIBAN = "PK36MEZN0001234567890101" MerchantApiKey = "YOUR_SECRET_WEBHOOK_KEY"

4. Step-by-Step Block Implementation

Step 4.1: Initiating Payment Intent

When a user clicks on the "Buy Premium" or "Subscribe" button in your app, call the InitiatePayment block. You pass the transaction amount, currency (PKR), item name, and customer identifier:

when Button_BuyPremium.Click do: call PakPaymentGateway.InitiatePayment( amount: 500, currency: "PKR", itemDescription: "1-Month VIP Subscription", userIdentifier: TinyDB1.GetValue("UserEmail", "[email protected]") )

Step 4.2: Handling the Deep Link Checkout Dialog

The extension automatically formats the intent for the user's installed JazzCash or EasyPaisa app, or renders a secure styled payment modal with 1-click copy for bank account numbers and payment instructions.

Step 4.3: Verifying Transaction and Granting Access

Once the customer completes the transaction, they submit the Transaction ID (TID) or SMS confirmation. The component validates the TID with your backend server or Google Sheet verification sheet:

when PakPaymentGateway.OnPaymentSuccess(transactionId, amount, paymentMethod) do: // Update local user state call TinyDB1.StoreValue("IsPremiumUser", true) call TinyDB1.StoreValue("LastTxnID", transactionId) // Show confirmation dialog to user call Notifier1.ShowAlert("Thank you! Payment of Rs " + amount + " verified via " + paymentMethod) // Refresh UI to unlock premium features set VerticalArrangement_PremiumContent.Visible to true

Step 4.4: Error and Cancellation Handling

Always attach listeners for failed or canceled transactions to give clear feedback to your customer:

when PakPaymentGateway.OnPaymentFailed(errorMessage, errorCode) do: call Notifier1.ShowMessageDialog( message: "Payment could not be completed: " + errorMessage, title: "Transaction Notice", buttonText: "Retry" )

5. Frequently Asked Questions (FAQ)

Does this require a registered corporate merchant account?

No! The extension supports both personal wallet accounts (EasyPaisa / JazzCash) and corporate merchant accounts. This makes it ideal for independent developers, students, and freelancers who cannot obtain NTN merchant licenses.

Will this work on Android 14 and Android 15?

Yes, Pak Payment Gateway Ultra is built targeting Android SDK 34 and SDK 35 standards, ensuring full compliance with Google Play background activity and permission requirements.

Conclusion & Next Steps

With Pak Payment Gateway Ultra, you can turn your Kodular apps into serious income-generating businesses tailored specifically for the Pakistani market. Get the extension today from AIX Hub Store and start accepting direct payments in less than 15 minutes!