SDK Initialization
Learn how to properly initialize the EdfaPay Soft POS SDK with your credentials.
Basic Setup
Call EdfaPayPlugin.initiate() before any payment operations. The SDK will authenticate, bind a terminal, and download configuration in one step.
Loading...Important
Always initialize the SDK before attempting any payment operations. Calling payment methods before initialization will result in errors.
Flutter Note
In Flutter, EdfaPayCredentials uses specific named constructors (withToken, withEmailPassword) and the authCode parameter is named token. See Authentication Options below.
Authentication Options
The SDK supports two authentication methods: Auth Token (recommended) and Email/Password.
| Method | Kotlin Parameter | Flutter Parameter | Use Case |
|---|---|---|---|
| Auth Token | authCode = "..." | token: "..." | Production / Recommended |
| Email + Password | email + password | Same named params | Development / Testing |
Loading...Security Warning
Never hardcode credentials in your application. Use secure storage mechanisms like Android Keystore, or retrieve tokens from your backend server at runtime.
Terminal BindingNew in v1.0.5
When the SDK is first initialized or multiple terminals are available, onTerminalBindingTask is invoked. You must bind a terminal to continue. This callback is triggered during: • First-time setup: When the device has not been bound to a terminal yet • Multi-terminal scenarios: When multiple terminals are available for the merchant • Terminal changes: When switching between terminals on the same device
bind()
Shows the SDK's built-in terminal selection UI. Simplest approach for most integrations.
terminals
Access the list of available terminals to build your own custom selection UI.
refresh()
Fetch the latest terminals list from the server if the list may be stale.
Loading...When is this callback triggered?
This callback is not always called. If a terminal is already bound and valid, the SDK proceeds directly to onSuccess. The callback is only triggered when terminal selection is needed.
Flutter Difference
In Flutter, onTerminalBindingTask passes a TerminalBindingTask object. Access task.terminals to get the list, then call task.bind() to show the SDK UI or task.bind(terminal: terminal) to bind a specific terminal.
TerminalBindingTask API Reference
Reference for the TerminalBindingTask and Terminal objects provided in the callback.
Loading...Environment Options
The SDK supports multiple deployment environments. Always use SANDBOX during development and PRODUCTION for live payments.
| Environment | Kotlin Enum | Description |
|---|---|---|
| Production | Env.PRODUCTION | Live payment environment — real transactions |
| Sandbox | Env.SANDBOX | Testing environment — no real charges |
| Staging | Env.STAGING | Internal staging environment |
| Development | Env.DEVELOPMENT | Developer/debug environment |
| Revamp | Env.REVAMP | Revamp platform environment |
On this page
Downloads
Coming SoonSample apps, release bundles, and more content will be available here soon.