EdfaPay Logo

API Reference

Complete listing of all public methods and properties of EdfaPayPlugin and its sub-modules. Use this as a quick lookup for method signatures, parameters, and return types.

EdfaPayPlugin

The primary singleton for all SDK operations. In Kotlin/Java accessed directly, in Java as EdfaPayPlugin.INSTANCE.

Initialization & Authentication

MethodDescription
initiate(context, credentials, onSuccess, onTerminalBindingTask, onError)Initialize SDK with credentials and callbacks
setPartnerConfig(config: String)Set encrypted partner configuration (must call before initiate)
bindTerminal(trsm, onSuccess, onError)Programmatically bind a specific terminal by TRSM
theme()Returns SdkTheme for chained configuration
setAnimationSpeedX(speed: Float)Set global animation multiplier

Payment Operations

MethodDescription
purchase(activity, txnParams, flowType, onPaymentProcessComplete, onCancelByUser, onCardScanTimerEnd, onRequestTimerEnd, onError)Process a purchase
authorize(activity, txnParams, flowType, ...callbacks)Start a pre-authorization
capture(activity, txnParams, flowType, ...callbacks)Capture an authorized amount
refund(activity, txnParams, flowType, ...callbacks)Refund a prior purchase
void(activity, transaction, onSuccess, onError)Void an unsettled transaction
reverse(activity, transaction, onSuccess, onError)Reverse a specific transaction
reverseLastTransaction(activity, onSuccess, onError)Reverse the most recent transaction
changePin(activity, parameters, ...callbacks)Initiate a PIN change flow
activateCard(activity, parameters, ...callbacks)Activate a new card

Terminal Management

MethodDescription
terminalInfo(onSuccess, onError)Get current terminal info
activateTerminal(password?, onSuccess, onError)Activate the terminal
deActivateTerminal(password?, onSuccess, onError)Deactivate the terminal
syncTerminal(onSuccess, onError)Sync terminal config with server

Session Management

Method / PropertyReturn TypeDescription
getSessionId()String? (Future in Flutter)Current active session ID
getSessionDetail(onSuccess, onError)SessionDetailFull detail of current session
getSessionList(onSuccess, onError)List<SessionDetail>All active sessions
logoutCurrentSession(onSuccess, onError)UnitLogout the current session
logoutSession(sessionId, onSuccess, onError)UnitLogout a specific session by ID

Transaction History

MethodDescription
txnHistory(pagination, onSuccess, onError)Retrieve paginated transaction list
txnDetail(txnId, onSuccess, onError)Get full details of a single transaction

Reconciliation

MethodDescription
reconcile(onSuccess, onError)Trigger end-of-day settlement
reconciliationHistory(pagination, onSuccess, onError)List of past reconciliation records
reconciliationDetail(reconciliationId, onSuccess, onError)Full detail of a reconciliation record
reconciliationReceipt(reconciliationId, onSuccess, onError)Generate printable receipt

Properties

PropertyTypeRead/WriteDescription
enableLogsBooleanR/WEnable debug logging
animationSpeedXFloatR/WAnimation speed multiplier
SDK_VERSIONStringRead-onlyCurrent SDK version string
SDK_VERSION_TIMESTAMPStringRead-onlyVersion with build timestamp
PARTNERStringRead-onlyPartner/flavor identifier

Data Models

Key model classes used throughout the SDK. In Flutter/RN/Xamarin, complex models are returned as Map<String, dynamic> or JSON.

Transaction

FieldTypeDescription
idStringInternal transaction ID
rrnStringRetrieval Reference Number
transactionNumberStringTransaction sequence number
amountStringTransaction amount
transactionTypeTransactionTypeType of transaction (PURCHASE, REFUND, etc.)
transactionStatusStringAPPROVED, DECLINED, etc.
authorizationCodeStringBank authorization code
maskedCardNumberStringMasked PAN (e.g., **** **** **** 1234)
cardSchemeStringVisa, Mastercard, AMEX, mada
createdDateStringTransaction date (ISO 8601)
terminalIdStringTerminal that processed the transaction
merchantIdStringMerchant ID

TxnParams

FieldTypeRequiredDescription
amountStringYesTransaction amount as a string (e.g., "100.00")
transactionTypeTransactionTypeYesType of transaction
orderIdString?NoCustom order reference ID
originalTransactionTransaction?ConditionalRequired for capture, refund, reverse, void

Pagination

FieldTypeDescription
pageIntPage number, 1-indexed
sizeIntItems per page
totalPagesInt (read)Server-returned total pages
totalElementsLong (read)Server-returned total count

Enums

EnumValues
TransactionTypePURCHASE, AUTHORIZE, CAPTURE, REFUND, REVERSAL, VOID, CASHBACK, CHANGE_PIN, CARD_ACTIVATION
FlowTypeIMMEDIATE, STATUS, DETAIL
EnvPRODUCTION, SANDBOX, STAGING, DEVELOPMENT, REVAMP
PresentationFULLSCREEN, DIALOG_CENTER, DIALOG_BOTTOM_FILL, DIALOG_BOTTOM_CENTER, DIALOG_TOP_FILL, ...
PurchaseSecondaryActionNONE, REVERSE, REFUND