Skip to content

Mobile SDK quickstart

The Zwipe SDK provides registration, verification, funding and card management inside your app. Your app supplies the customer’s profile and restaurant publishable key. Zwipe manages the card session and connects to your program’s payment and card services.

For your own interface and backend, see the REST API quickstart.

Request a restaurant key and configure your card program, branding, payment methods, rewards and Community feed with Zwipe. For development, use the public key described in Test environments.

The example app uses Expo 58 and React Native 0.88. Install the package and native dependencies:

Terminal window
npx expo install "@zwipe/react-native@https://api.zwipe.co/docs/examples/zwipe-react-native-0.3.3.tgz"
npx expo install @stripe/stripe-react-native expo-secure-store expo-clipboard expo-web-browser react-native-safe-area-context react-native-svg lucide-react-native expo-intent-launcher

For an existing React Native project, install Expo modules first. The package README lists dependency requirements and native configuration.

Choose a URL scheme and use the same value in returnUrlScheme. Merge these entries into your Expo configuration:

{
"expo": {
"scheme": "yourrestaurant",
"plugins": [
"expo-secure-store",
"expo-web-browser",
["@stripe/stripe-react-native", { "enableGooglePay": false }]
]
}
}

Rebuild the native app after configuration changes. Apple Pay and Google Pay checkout require platform setup and activation for your restaurant; follow the package README when enabling them.

Mount ZwipeCardFlow inside your navigation and SafeAreaProvider. Pass your restaurant key and the signed-in customer’s details:

import { ZwipeCardFlow } from '@zwipe/react-native';
<ZwipeCardFlow
publishableKey={restaurant.zwipePublishableKey}
customer={{
email: user.email,
first_name: user.firstName,
last_name: user.lastName,
phone: user.phone,
}}
returnUrlScheme="yourrestaurant"
showNotifications={false}
branding={{
restaurantName: restaurant.name,
cardName: restaurant.cardName,
cardArt: restaurant.cardArtwork,
}}
onClose={() => navigation.goBack()}
/>

Use E.164 phone numbers, such as +12025550147. Profile data prefills registration; the SDK verifies the customer before allowing card access. Use onProfileChange to reflect profile edits in your host account state.

ZwipeCardEntry displays Get started before card issuance, then the balance and Add funds for an existing card. Pass the same key and customer to both components.

import { ZwipeCardEntry } from '@zwipe/react-native';
<ZwipeCardEntry
publishableKey={restaurant.zwipePublishableKey}
customer={customer}
refreshKey={cardRevision}
onPress={(initialScreen) => navigation.navigate('ZwipeCard', { initialScreen })}
/>

Pass the requested initialScreen to ZwipeCardFlow and update refreshKey when it closes. Use onStateChange for a custom balance widget. The integration component shows both components together.

  1. Review registration details and complete verification.
  2. Choose a funding amount and complete payment.
  3. Wait for confirmation that the funds and card are available.
  4. Add the card to Wallet using the available device flow, or continue to the card screen.
  5. View the balance, rewards, Community, transaction history and account settings.

Returning customers resume their existing card session. On iPhone, Wallet setup uses the issuer handoff. On Android, the SDK provides card details and instructions for manual setup in Google Wallet.

Use your restaurant’s key, artwork and links. Verify the customer journey on supported iOS and Android devices, including interrupted payments, session restoration and Wallet setup. Keep server API credentials out of the app.

See React Native integration for options and Test environments for the runnable example.