Skip to main content
The Mobile Deposit SDK (@swype-org/deposit-mobile) opens Blink’s hosted deposit flow in an in-app browser (SFSafariViewController on iOS, Chrome Custom Tabs on Android). The user completes payment inside the browser, and the result is returned to your app via a deep link callback.

Install

Quick start (vanilla)

React Native (Expo)

The hook returns reactive status, result, error, displayMessage, and isActive values, plus requestDeposit, handleDeepLink, focus, and close actions. It manages the MobileDeposit lifecycle and cleans up on unmount. Your mobile app must be configured to handle the callback URL scheme so the hosted flow can redirect back after payment.

Expo / React Native

In app.json:

iOS (native)

Register your URL scheme in Info.plist:

Android (native)

Add an intent filter in AndroidManifest.xml:
The SDK does not set up deep link listeners itself. This keeps it platform-agnostic. Forward incoming URLs to handleDeepLink():
handleDeepLink() returns true if the URL was a Blink callback, false otherwise.

Configuration

Dark and light mode

The hosted deposit flow ships both a light and a dark palette. Pick one with the appearance.theme config, which mirrors the web SDK:
Unlike the web SDK, the mobile SDK does not auto-detect a theme — there is no host page to read a color-scheme from. If you do not pass appearance, the flow renders light even in a dark-mode app.

Following the device theme

theme: 'system' is the right default for most apps. It resolves inside the in-app browser against the same OS setting React Native’s useColorScheme() reports, and it keeps tracking the device theme for the whole flow:

Following an in-app theme toggle

If your app has its own light/dark switch that can diverge from the OS setting, pass the resolved value explicitly. The MobileDeposit instance reads the theme at construction, and the hook creates that instance once on first render — so changing the prop alone does nothing. Remount with a key:
Outside React, create a new instance the same way — deposit.destroy(), then new MobileDeposit({ ..., appearance: { theme } }).

In-app browser chrome

appearance themes the Blink UI inside the browser. The browser’s own chrome — the Safari View Controller bar on iOS, the Custom Tabs toolbar on Android — is not controlled by the SDK. Style it through your openUrl implementation, for example WebBrowser.openBrowserAsync(url, { toolbarColor, controlsColor }) with expo-web-browser.

In-app browser requirements

The hosted deposit flow uses WebAuthn passkeys for transaction signing. This requires a system browser component:
  • iOS: Use SFSafariViewController (supports WebAuthn). WKWebView does not support WebAuthn.
  • Android: Use Chrome Custom Tabs (supports WebAuthn). WebView does not support WebAuthn.
  • Expo: Use expo-web-browser (WebBrowser.openBrowserAsync), which uses the system browser component on each platform.
Embedded WebView components do not support WebAuthn passkey ceremonies. Always use SFSafariViewController (iOS) or Chrome Custom Tabs (Android).

Custom signer function

If you need full control over the HTTP call to your signer (custom headers, auth tokens, different HTTP method), pass a function instead of a URL:

Status flow

Error handling

See Mobile Error Codes for the full reference. Every error is a DepositError with a machine-readable code:

Shared types

The mobile SDK shares DepositRequest, DepositResult, TransferSummary, SignerRequest, SignerResponse, and SignerFunction types with the web @swype-org/deposit SDK. See Types for definitions.

Lifecycle

Differences from the web SDK