Flutter SDK
Overview
coinflow_card_form is a Flutter SDK that embeds Coinflow’s card tokenization form directly into iOS and Android apps from a single Dart codebase. The user enters their card inside your app, the SDK returns a payment token, and your backend charges the card via the standard Coinflow checkout API.
- Package:
coinflow_card_form - Distribution: pub.dev
- Current version:
0.1.0
Requirements
- Flutter 3.x+
- iOS 15+ / Android
minSdk24+
Installation
Or in pubspec.yaml:
Integration
Add the card form widget
Drop CoinflowCardFormWidget into your widget tree and pass a CoinflowCardFormController you’ll use to trigger tokenization.
your-merchant-id is an example placeholder. Use your actual merchant ID from the merchant dashboard, or contact the Coinflow integrations team. Typically injected with --dart-define=COINFLOW_MERCHANT_ID=..., not hard-coded.
Wait for the form to load
Call controller.tokenize() only after the form has loaded. Either pass an onLoad callback or check controller.isLoaded before invoking:
Invoking tokenize() earlier throws CoinflowException('Card form not yet loaded'). Concurrent calls also throw — only one tokenize can be in flight at a time.
Configure the environment
CoinflowEnv.sandbox— test cards, no real moneyCoinflowEnv.prod— live cards, real money
Charge the token server-side
controller.tokenize() returns a Future<TokenizeResponse>:
token— payment token to send to your backendexpMonth,expYear— populated only for variants that collect expiry
Send the token to your server and call Coinflow’s checkout API to charge it. See the Checkout API reference for the full request shape.
Variants
Theming
MerchantTheme styles the rendered form. All fields optional.
All theme fields
Resources
- Source: github.com/coinflow-labs-us/coinflow-flutter
- pub.dev: coinflow_card_form
- License: Apache 2.0
- Checkout API: Card Checkout endpoint

