Skip to content

React Native and Flutter

Open ZwipeCardFlow from your app’s navigation with the restaurant publishable key and customer profile. Follow the mobile SDK quickstart for installation and native configuration.

New customers review their profile, complete verification and fund their card. After confirmation, the SDK offers Wallet setup and opens the card screen. Returning customers resume their existing card.

The card screen includes Home, Community, Boost, History and Settings. Guests can view their balance, add funds, reveal card details, read restaurant posts, track rewards and transactions, and manage their profile.

Option Purpose
branding.restaurantName, cardName, cardArt Restaurant identity and card artwork.
branding.headlineFont, branding.colors A host-loaded font and interface colors.
branding.reserveUrl, orderUrl, giftUrl Restaurant actions displayed on Home.
branding.termsUrl, supportEmail Customer support and terms.
showNotifications Display the notification entry; use false to hide it.
onProfileChange Update the host account after profile edits.
onStateChange Update a host balance widget when card state changes.

Community content, rewards, payment methods and auto top-up availability depend on the restaurant program. App-provided branding overrides the corresponding restaurant defaults.

On iPhone, the SDK opens the issuer’s Apple Wallet handoff. On Android, it displays card details and instructions for manual entry into Google Wallet. The customer confirms completion when returning to the app.

Use your existing push library and permission flow. Configure the app’s APNs or Firebase credentials with Zwipe before enabling delivery.

import { openZwipeNotification, registerZwipePushToken, unregisterZwipePushToken } from '@zwipe/react-native';
await registerZwipePushToken(deviceToken);
// For Firebase Messaging on iOS, pass 'fcm' as the second argument.
if (openZwipeNotification(tappedPayload)) navigation.navigate('ZwipeCard');
await unregisterZwipePushToken({ publishableKey });

Connect your Flutter interface to your authenticated backend, then call Zwipe’s REST API. See the REST API quickstart and backend integration guide.

Download the hosted adapters. Add the flutter/ folder as a path dependency and run flutter pub get.

dependencies:
zwipe_hosted_card:
path: ./vendor/zwipe-hosted-adapters/flutter
import 'package:zwipe_hosted_card/zwipe_hosted_card.dart';
ZwipeHostedCard(
publishableKey: 'zw_pk_demo_restaurant',
customer: {'email': 'alex@example.com', 'first_name': 'Alex',
'last_name': 'Morgan', 'phone': '+12025550147'},
onClose: () => Navigator.pop(context),
onOpenLink: openInSystemBrowser,
)

Implement openInSystemBrowser with your app’s URL launcher. Recreate the widget with a different key when the signed-in customer changes. The adapter uses webview_flutter; it does not depend on React Native. Checkout and Wallet behavior follow the web integration.

Build and test the adapter in your Flutter host before distribution, including keyboard, navigation, payment authentication and Wallet handoff on physical devices.