Payment gateway integration in mobile app projects looks simple in a demo and gets complicated in production. The SDK call that charges a card is a small part of the work. Choosing a provider your business can actually open an account with, following Apple and Google billing rules, confirming payments on the server and handling refunds and failures make up most of it.
This guide covers four gateways our clients ask about most: Stripe and PayPal for international markets, and JazzCash and Easypaisa for Pakistan. For how we deliver the integration work, see our payment gateway integration for mobile apps page; for the compliance side, read our guide to fintech app compliance.
Step zero: in-app purchase or a payment gateway?
Before choosing a gateway, check whether you are allowed to use one. The app stores decide this by what you sell.
- Digital features and content (subscriptions, premium tiers, in-game currency, a full version): Apple Guideline 3.1.1 requires in-app purchase, and Google Play requires Play billing for digital items and subscriptions.
- Physical goods and real-world services (e-commerce, food delivery, taxis, bookings): Apple Guideline 3.1.3(e) says these must use payment methods other than IAP, such as Apple Pay or card entry. Google Play says Play billing must not be used for physical goods, physical services, bill payments or peer-to-peer payments.
In those second cases a payment gateway is the right tool. For digital goods, the rules are in flux in some markets. Google offers user choice billing in the UK, EEA and other regions, with separate programmes for the US, and in the US Apple’s rules on external payment links have changed through ongoing litigation. US rules on external payment links are changing; we design to the current rules at build time and confirm them before submission.
Stripe vs PayPal vs JazzCash vs Easypaisa
A practical comparison for app teams. Fees and onboarding requirements change, so confirm current terms with each provider.
| Gateway | Where it fits | Payment methods | Mobile integration approach |
|---|---|---|---|
| Stripe | Businesses incorporated in a Stripe-supported country (the US, UK and UAE are listed; Pakistan is not) | Cards, Apple Pay, Google Pay and other methods depending on country | Native iOS and Android SDKs and prebuilt payment sheets; card data tokenised by Stripe |
| PayPal | International buyers who prefer paying with a PayPal balance or linked account | PayPal accounts and cards, depending on market | Provider SDKs or a web checkout flow opened from the app |
| JazzCash | Pakistan-market apps | Card API (Visa/Mastercard), Mobile Wallet API, over-the-counter vouchers | Hosted checkout or APIs with 3D Secure, IPN webhooks and a sandbox; a “Pay with JazzCash” SDK exists for Cordova |
| Easypaisa | Pakistan-market apps, open to businesses with a live website or mobile app | Easypaisa Mobile Account and OTC tokens paid at an Easypaisa shop | Online payment gateway integrated via its checkout and APIs |
Based on each provider’s public documentation as of October 2026. Many Pakistan apps offer both a local gateway and cash on delivery.
Stripe: the default where you can use it
Stripe’s mobile SDKs and prebuilt payment sheet give a polished card, Apple Pay and Google Pay experience with relatively little code. The compliance benefit is just as important: according to Stripe, when you use Elements, Checkout or its mobile SDKs, card data never touches your servers, and merchants typically qualify for SAQ A, the lowest-burden PCI DSS option. Stripe adds that this does not make you compliant by default.
The catch for Pakistan-based businesses: Stripe’s global availability page lists 51 countries, and Pakistan is not among them, while the US, UK and UAE are. So a Pakistan-registered company usually cannot open a Stripe account in its own name. Founders selling internationally often operate through an entity in a supported country; that is a legal and tax decision for your advisers, not a technical workaround.
PayPal: an extra option, rarely the only one
PayPal is useful as a second button for international buyers who already have an account, particularly on marketplaces and for higher-value one-off purchases. As the only payment method in a mobile app it usually adds friction, because the flow leaves the app UI for PayPal’s login. We typically add it alongside cards and native wallets, never instead of them. Like Stripe, PayPal does not currently serve Pakistani businesses for receiving payments, so it fits apps whose operating entity sits in a market PayPal supports.
Treat PayPal like any other gateway on the server side: create the order on your backend, let the app hand the user to PayPal’s flow, and confirm the result through server-side verification or webhooks before you fulfil the order.
JazzCash and Easypaisa for Pakistan
For apps selling to customers in Pakistan, mobile wallets are essential. JazzCash’s gateway documentation describes a Card API for Visa and Mastercard, a Mobile Wallet API and an over-the-counter voucher API, with hosted checkout, 3D Secure, IPN (instant payment notification) webhooks, a sandbox and a “Pay with JazzCash” SDK for Cordova. Native Flutter, React Native, Swift and Kotlin apps therefore usually integrate through the APIs or the hosted checkout rather than a drop-in native SDK.
The Easypaisa Online Payment Gateway accepts payment through an Easypaisa Mobile Account or OTC, where the customer receives a token and pays at an Easypaisa shop. It is open to any business with a live website or mobile app.
Two Pakistan-specific design points. First, OTC and voucher payments complete later, sometimes hours later, so orders need a “pending payment” state, reminders and expiry. Second, keep cash on delivery as a first-class option where your category supports it, with its own order flow rather than a special case bolted onto card payments. For bank transfers, the State Bank of Pakistan’s Raast instant payment system added person-to-person payments in February 2022, using an IBAN or a Raast ID (mobile number), and is free for end customers.
Pick gateways by where your business is registered and where your customers are. International apps usually start with Stripe plus Apple Pay and Google Pay; Pakistan apps usually need JazzCash and/or Easypaisa plus cash on delivery. Either way, the server, not the app, decides when an order is paid.
How payment gateway integration in mobile app projects should work
The architecture we use regardless of provider. It keeps secrets off the phone and makes payments verifiable.
Create the order on your server
The app sends the cart; the backend calculates the amount, currency, tax and discounts. Never trust a price sent from the phone.
Create a payment session server-side
Your backend calls the gateway with its secret key and returns a session or client token to the app. Secret keys never ship in the app binary.
Collect payment with the provider’s UI
Use the provider’s SDK, payment sheet or hosted checkout so card and wallet details go straight to the gateway, including 3D Secure challenges.
Confirm through webhooks
Mark the order paid only when the gateway’s webhook or IPN arrives and its signature or hash checks out. The app’s “success” callback is a hint, not proof.
Make every step idempotent
Networks drop. Use idempotency keys or order references so a retried request never charges twice, and handle duplicate webhooks safely.
Handle refunds, failures and reconciliation
Build refunds and partial refunds into the admin panel, show clear failure messages, and reconcile gateway settlements against orders daily.
Planning payments for your app?
Tell us where your business is registered, where your customers are and what you sell. We will recommend gateways and reply within one business day.
Payment testing checklist before launch
Payment bugs cost money and reviews. Test these in each gateway’s sandbox, then with small live transactions.
- Successful card payment, including a 3D Secure challenge
- Declined card, insufficient funds and expired card messages
- User closes the app or loses signal mid-payment, then reopens it
- Duplicate taps on the pay button create one charge only
- Webhook arrives before, after and twice relative to the app callback
- Wallet payment approved on the phone after the checkout times out
- OTC or voucher payment completed hours later, and voucher expiry
- Full and partial refunds from the admin panel, reflected in the app
- Apple Pay and Google Pay on real devices, not only simulators
- Currency, rounding and tax display for each market
- No card data, tokens or secrets in logs or crash reports
- Reconciliation report matches gateway settlement for a test day
Common integration mistakes
- Fulfilling on the client callback. A modified or replayed app request can mark an order paid. Only the server-verified webhook should.
- Secret keys in the app. Anything in the binary can be extracted.
- One gateway, no fallback. If the only gateway has an outage, sales stop. In Pakistan in particular, offer a wallet plus cash on delivery or a second gateway.
- Using IAP for physical goods, or a gateway for digital features. Both are common rejection causes; see our app store rejection reasons guide.
- No pending state. Wallet and voucher payments are not instant, and orders stuck in limbo create support tickets.
Payments sit inside the wider backend, so the backend and API development work and the admin panel for refunds belong in the same scope. For full app suites with payments, see e-commerce app development and e-wallet app development.
Payment gateway integration FAQs
Can a Pakistan-based company use Stripe?
Not directly in its own name at present. Stripe’s global availability page lists 51 countries, and Pakistan is not one of them, while the US, UK and UAE are. Businesses selling internationally often operate through an entity in a supported country. That is a legal and tax decision to make with your advisers, not something an app can work around.
Do I need in-app purchase instead of a payment gateway?
It depends on what you sell. Apple requires IAP for digital features and content, and Google requires Play billing for digital items. Physical goods and real-world services, such as e-commerce, food delivery and taxis, must use other payment methods. Some markets now allow alternative billing for digital goods under specific programmes.
Does JazzCash have a native mobile SDK?
JazzCash’s documentation lists a “Pay with JazzCash” SDK for Cordova, plus Card, Mobile Wallet and voucher APIs with hosted checkout, 3D Secure, IPN webhooks and a sandbox. For Flutter, React Native or native Swift and Kotlin apps, teams usually integrate through the APIs or hosted checkout, with server-side verification of IPN callbacks.
Is it safe to collect card details in our own app form?
It is possible but rarely wise. Sending card numbers to your own servers puts them in PCI DSS scope and raises your security burden. Stripe says that using its SDKs or Checkout keeps card data off your servers and typically qualifies you for SAQ A. Use the provider’s components unless you have a strong reason not to.
How long does payment integration take?
It depends on the number of gateways, payment methods and flows such as refunds, subscriptions or split payouts. A single provider SDK with webhooks is a modest task; multiple local gateways, cash on delivery and reconciliation reporting take longer. We estimate it line by line in discovery, and the cost calculator gives a starting range.
Get payments right the first time
Share your markets, products and current stack. We will reply within one business day with recommended gateways and a plan for a fixed quote after discovery.
