Powered by Coinflow
Payments · Documentation
Operational

Mobile SDK Overview

Overview

Coinflow publishes first-party SDKs for Swift, Android (Kotlin), Flutter, and React Native that embed the card tokenization form directly into native mobile apps. Every SDK renders the same PCI-compliant card form used on the web, surfaces a single tokenize() call, and returns a payment token your backend can charge.

Use a mobile SDK when you want the card entry experience to stay inside your app — no redirect out to a browser, no WebView wiring you have to maintain yourself.

When to use a mobile SDK

Mobile SDK (embedded)

Renders the card form directly inside your app. You control the surrounding UI and the moment tokenization happens.

Best for:

  • Apps that need full control over checkout UI/UX
  • Subscription sign-up, card-on-file capture, replacing a saved card
  • Tokenization flows where you charge later server-side

View the Swift, Android, and Flutter guides below

Browser redirect

Generates a hosted checkout URL and opens it in the user’s browser. No frontend code required.

Best for:

  • The simplest possible integration
  • Apps that already use universal links / deep links for return flows
  • One-time purchase flows where leaving the app is acceptable

View the Browser Redirect Guide

What the SDK does

  1. Renders the Coinflow card form inside a native view.
  2. Captures the card data inside Coinflow’s PCI scope — sensitive data never touches your app code.
  3. Exposes a single tokenize() call you invoke when the user taps your Pay button.
  4. Returns a TokenizeResponse containing the payment token (and optionally expMonth / expYear).
  5. You forward that token to your backend, which calls Coinflow’s checkout API to charge the card.

The SDK only handles card capture and tokenization. The actual charge happens server-side via the standard Coinflow checkout API using the returned token.

Available SDKs

Swift (iOS)

SwiftUI SDK for iOS 15+. Distributed via Swift Package Manager.

Android (Kotlin)

Jetpack Compose SDK for minSdk 24+. Distributed via Maven Central.

Flutter

Flutter SDK for iOS 15+ / Android 24+. Distributed via pub.dev.

React Native

React Native SDK for iOS 15+ / Android 24+. Distributed via npm. Uses react-native-webview under the hood.

Common concepts

Merchant ID

Every SDK takes a merchantId string. This is issued by Coinflow when you sign up and is visible in the merchant dashboard. The same value works for both sandbox and production.

your-merchant-id is an example placeholder. Contact the Coinflow integrations team or check the merchant dashboard for your actual merchant ID before going live.

Environment

Every SDK takes an env enum that selects which Coinflow backend the form talks to:

  • Sandbox — test cards, no real money. Use during integration and QA.
  • Prod — live cards, real money.

Variants

Each SDK exposes three form variants:

Variant Captures Use case
cardForm Number, expiry, CVV Standard one-shot card entry
cardNumberForm Number + expiry Step 1 of a two-step flow; returns a token used later with cvvForm
cvvForm CVV only Re-collecting CVV for a saved card-on-file token

Theming

Each SDK accepts an optional MerchantTheme that styles the form to match your app — colors, fonts, input shape, and placeholder text. All fields are optional. See each platform’s integration guide for the full field list.