Native WebView vs external browser
| Approach | Automatic return | UX | Recommended |
|---|---|---|---|
| Native WebView | Yes — URL-based detection | Smooth, stays in the app | ✅ |
| SFSafariViewController / Chrome Custom Tabs | Partial — deep link required | Briefly leaves the app | Acceptable |
| System browser | No | Leaves the app | ✗ |
SFSafariViewController (iOS) and Chrome Custom Tabs (Android) do not let you intercept redirects to your return URLs. They are not suitable for this use case without setting up a deep link.React Native
Dependency:react-native-webview
React Native
Flutter
Dependency:webview_flutter
pubspec.yaml
Flutter
iOS (Swift / WKWebView)
iOS (Swift)
iOS (Swift)
Android (Kotlin / WebView)
Android (Kotlin)
Android (Kotlin)
PaymentActivity in your AndroidManifest.xml:
AndroidManifest.xml
After return detection
The flow is identical across platforms:Show a verification screen
Display a loading indicator — “Verifying payment…” — while your backend is queried.
Call your backend
Your backend calls the
confirm endpoint with the token stored at invoice creation.Related pages
- Redirect the customer — web popup pattern and overview of opening modes
- Verify the status — call
confirmafter the redirect - Common pitfalls — blocked iframe and other frequent errors
