On mobile, opening the Banxa checkout in an external browser is the simplest integration path. It avoids all WebView configuration complexity and is compatible with all payment methods.
Use Custom Chrome Tabs to open the checkout URL. This provides a browser-quality experience while keeping the customer in your app's task stack.
Do not use a standard WebView for redirect checkout on Android. WebView has known issues with Google Pay (GPAY) and ACH bank transfers.
// Kotlin
import androidx.browser.customtabs.CustomTabsIntent
fun openBanxaCheckout(context: Context, checkoutUrl: String) {
val customTabsIntent = CustomTabsIntent.Builder()
.setShowTitle(true)
.build()
customTabsIntent.launchUrl(context, Uri.parse(checkoutUrl))
}// Java
CustomTabsIntent customTabsIntent = new CustomTabsIntent.Builder()
.setShowTitle(true)
.build();
customTabsIntent.launchUrl(context, Uri.parse(checkoutUrl));Add the dependency to your build.gradle:
implementation 'androidx.browser:browser:1.5.0'Use SFSafariViewController to open the checkout URL. This gives customers a full Safari experience (including saved passwords and Apple Pay) while staying within your app.
// Swift
import SafariServices
func openBanxaCheckout(url: URL) {
let safariVC = SFSafariViewController(url: url)
present(safariVC, animated: true)
}Note: KYC liveness checks (Sumsub) require
SFSafariViewControlleror the system Safari browser. They will not work in a standardWKWebView.
Use the react-native-inappbrowser-reborn package or Linking to open the checkout URL in the device browser or an in-app browser view.
import { Linking } from 'react-native';
// or
import InAppBrowser from 'react-native-inappbrowser-reborn';
async function openBanxaCheckout(checkoutUrl) {
if (await InAppBrowser.isAvailable()) {
await InAppBrowser.open(checkoutUrl, {
// iOS
dismissButtonStyle: 'cancel',
preferredBarTintColor: '#000000',
// Android
showTitle: true,
enableUrlBarHiding: true,
});
} else {
Linking.openURL(checkoutUrl);
}
}Use the url_launcher package to open the checkout URL in a Custom Tab (Android) or SFSafariViewController (iOS).
import 'package:url_launcher/url_launcher.dart';
Future<void> openBanxaCheckout(String checkoutUrl) async {
final uri = Uri.parse(checkoutUrl);
if (await canLaunchUrl(uri)) {
await launchUrl(
uri,
mode: LaunchMode.externalApplication, // opens Custom Tab / SFSafariVC
);
}
}Add the dependency to pubspec.yaml:
dependencies:
url_launcher: ^6.1.0When checkout is complete, Banxa redirects to your redirectUrl. Handle this using your platform's deep link or URL scheme handling, then look up the order status via webhook or the order lookup endpoint.