Flutter is a common choice for Pakistani startups building one app for both Android and iOS, and like most cross-platform frameworks, it has no built-in package for local Pakistani payment methods -- the integration is built around a WebView and your own backend.
The typical Flutter integration pattern
Backend creates the payment
Your Flutter app calls your own backend (not the gateway directly), which creates the payment session with SwichPay's API using your server-side API credentials, and returns a checkout URL to the app.
WebView shows the checkout
The Flutter app opens that URL in a WebView (using a package like webview_flutter or flutter_inappwebview), where the customer picks JazzCash, Easypaisa, Raast or card and completes the payment on the gateway's hosted page.
Backend confirms via webhook
Your backend receives the IPN/webhook when the payment completes, verifies it, and updates the order. The app then checks the order status from your backend (polling or push notification) rather than inferring success purely from the WebView closing.
Handling the WebView lifecycle
A common Flutter-specific issue is detecting when the customer has actually finished (success, failure, or cancelled) inside the WebView, since there is no native callback for this -- most implementations watch for the WebView navigating to a known success/failure URL pattern and close the WebView at that point, then re-check the real status from the backend.
Frequently asked questions
Is there a Flutter package for SwichPay or JazzCash?
No official package exists; the standard approach is a WebView-based checkout driven by your own backend, which is a well-understood pattern for Pakistani payment integrations in Flutter.
Should payment confirmation happen in the Flutter app or the backend?
Always in the backend, via the gateway's webhook/IPN. The app should only display status it reads back from your own backend, not infer success from the WebView closing.
Start accepting payments with SwichPay
Open a merchant account, connect your website with one API and get notified the moment a customer pays.
