SDK Setup & Installation
Follow this step-by-step guide to integrate the EdfaPay Soft POS SDK into your application. Covers prerequisites, repository configuration, and dependency implementation.
Prerequisites
Before you begin the integration, ensure your development environment meets the following requirements. The SDK requires a minimum Android SDK version to function correctly with NFC capabilities.
Android Min SDK
Version 29 (Android 10) or higher. Flutter: minSdk = 29 in android/app/build.gradle.kts. React Native: minSdkVersion = 29 in android/build.gradle.
Hardware
NFC-enabled Android device
Build Tools
Kotlin 2.0+ (Java apps need no Kotlin plugin)
compileSdk 36 or higher
AGP 8.9.1+
SDK Credentials
An SDK token (or email and password) that you generate in the EdfaPay dashboard, see Token Management. Each one belongs to one environment, DEMO for testing or PRODUCTION for live, and works only there. You pass it to initiate() in Step 4; it is not the Maven repository account in Step 2.
Host Activity
A FragmentActivity, for example AppCompatActivity (FlutterFragmentActivity in Flutter; in React Native, ReactActivity already is one). The SDK shows its screens over it. Its theme must descend from Theme.AppCompat or Theme.MaterialComponents if you call Utils.requestBatteryUnrestricted, requestExactAlarmPermission or requestAutostartPermission: their dialogs use your activity's theme.
Location Permission
ACCESS_FINE_LOCATION granted at runtime before the first payment. With a token login the SDK does not ask for it, so request it yourself.
Add Maven Repository
Add the EdfaPay Maven repository so Gradle can download the SDK artifacts. Native Android declares it in settings.gradle(.kts); Flutter and React Native add it inside their app's android/ project. Use the form that matches your build files: Kotlin DSL (.kts) or Groovy DSL (.gradle). Flutter and React Native also need the same account as two Gradle properties (last part of their block).
Loading...Kotlin DSL vs Groovy DSL
Newer templates use the Kotlin DSL (settings.gradle.kts) with dependencyResolutionManagement; older ones use the Groovy DSL (build.gradle) with an allprojects block. Pick whichever matches your existing Android build files — don't add both. Flutter uses the allprojects block in both forms.
Repository account, not SDK credentials
The username and password in this block are EdfaPay's public read-only account for downloading the SDK from the Maven repository. They are the same for every integrator. Your SDK credentials (auth token, or email and password) are different: they go into EdfaPayCredentials when you call initiate() in Step 4, never into this block.
Add Dependency
Add the SDK dependency to your app module's build file.
| Platform | Package | Version |
|---|---|---|
| Android (Kotlin, Java) | com.edfapay:saEdfapay | 1.0.8 |
| Flutter | edfapay_softpos_sdk | 1.0.8 |
| React Native | edfapay-softpos-sdk-rn | 1.0.8 |
| Xamarin | EdfaPay.PaymentCard | 1.0.5 |
Loading...Flavor coordinate changed in v1.0.8
The recommended native artifact is com.edfapay:saEdfapay:1.0.8. The old com.edfapay:sa-edfapay-revamp coordinate is deprecated (still published at 1.0.8 for backward compatibility, but will be removed). For Dspread external card-reader devices use com.edfapay:saEdfapayDspread:1.0.8. Flutter and React Native pin the native dependency internally — you only set the plugin version.
Packaging Options
To avoid duplicate file conflicts during build, add the following packaging exclusions to your app/build.gradle.kts:
Loading...ProGuard Rules
If you have minification enabled in your release build, add these rules to your proguard-rules.pro to prevent the SDK classes from being obfuscated:
Loading...5-Minute Quick Start
Get up and running quickly with this minimal example. This code demonstrates the basic flow: initialize the SDK, ask for location, then process a payment. Before you run it, check Step 1, Prerequisites: the activity must be a FragmentActivity, and location permission is needed before the first payment. The example uses Env.DEMO, the test environment that never charges a card, so use a token issued for DEMO: a token works only in the environment that issued it.
On docs.edfapay.com
After your first payment, check it in the dashboard: Transactions.
Loading...That's it!
You've integrated the SDK. Test on Env.DEMO, then switch to Env.PRODUCTION with a token issued for PRODUCTION. For credentials, terminal binding and environments, see the Initialization guide.
Hosting the SDK in Jetpack Compose
initiate() takes a FragmentActivity, and purchase() and the other payment calls accept one as their activity argument; the SDK shows its screens over that activity. The Android Studio Compose template's MainActivity extends ComponentActivity, which is not a FragmentActivity. Change it to FragmentActivity: setContent works the same, and your composables stay as they are. Call the SDK from the activity, not from a composable. Add androidx.fragment:fragment-ktx to your app's dependencies: the template has no fragment library, and the SDK's does not reach your compile classpath. The template's theme (android:Theme.Material.Light.NoActionBar) is not an AppCompat theme; set the activity's theme to one, for example Theme.MaterialComponents.DayNight.NoActionBar.
Loading...On this page
Downloads
Coming SoonSample apps, release bundles, and more content will be available here soon.