1. Prerequisites
- Flutter SDK
>=3.x - A Cashful merchant account with:
- Merchant ID — identifies your merchant account
- API key — authenticates API requests (created in the merchant dashboard under Settings > API Keys)
- Familiarity with
StatefulWidget,async/await, and basic WebView concepts
2. Installation
Add both dependencies to yourpubspec.yaml:
3. Platform Configuration
Android
Internet Permission (Required)
The default Flutter project only includes theINTERNET permission in debug/profile build variants. You must add it to the main manifest for release builds to work.
Edit android/app/src/main/AndroidManifest.xml:
Minimum SDK Version
webview_flutter requires Android API 21+. If your minSdk is delegated to flutter.minSdkVersion (the default), this is already satisfied. To set it explicitly, edit android/app/build.gradle.kts:
iOS
No additional configuration is required.webview_flutter uses WKWebView on iOS, which is available on all supported iOS versions. The Cashful checkout is served over HTTPS, so App Transport Security (ATS) does not need to be modified.
4. SDK Setup
Configure the API client with your API key:| Environment | Base URL |
|---|---|
| Sandbox | https://sandbox.api.cashful.africa |
| Production | https://api.cashful.africa |