EdfaPay Logo

Payment Operations

Process contactless card payments using the EdfaPay Soft POS SDK. Supports Purchase, Authorize, Capture, Refund, Void, and Reverse operations with full NFC workflow.

Transactions

The EdfaPay Soft POS SDK supports six payment operations covering the complete transaction lifecycle.

Transaction Flow

Payment Transaction Lifecycle

Understanding the logical paths from initialization to settlement.

1. SDK Initialization

Session setup, terminal configuration download, and security attestation.

Option A: Direct Sale

Purchase Operation

Authorization and capture in one atomic step. Recommended for standard retail.

Option B: Deferred Sale

Authorize Operation

Funds held on the card. Requires a separate Capture step to claim. Used for hotels/rentals.

3. Active Management

CAPTUREFor Authorize paths
REVERSE / VOIDFor cancellations

4. Settlement & Finality

End-of-day reconciliation pushes funds to your merchant account.

Post-Settlement Refund

TxnParams — Transaction ParametersUpdated v1.0.5

The TxnParams class holds all parameters for a transaction. It is required for every payment operation.

Loading...

Transaction Types

The transactionType field determines how the transaction is processed.

TypeDescriptionRequires originalTransactionForce PIN
TransactionType.PURCHASEStandard sale transactionNoNo
TransactionType.AUTHORIZEPre-authorization (hold funds)NoNo
TransactionType.CAPTURECapture pre-authorized amountYesNo
TransactionType.REFUNDRefund a previous purchaseYesNo
TransactionType.REVERSALReverse/cancel a transactionYesNo
TransactionType.VOIDVoid unsettled transactionYesNo
TransactionType.CASHBACKPurchase with cashbackNoNo
TransactionType.CHANGE_PINPIN change operationNoYes
TransactionType.CARD_ACTIVATIONActivate a new cardNoYes

Flow Types

FlowType controls the UI experience shown to the user during transaction processing.

FlowTypeDescriptionUse Case
FlowType.IMMEDIATEMinimal UI, closes immediately, callback fires with isFlowComplete=trueBackground/silent transactions
FlowType.STATUSShows transaction status briefly then closesSimple feedback
FlowType.DETAILFull transaction details and receipt with action buttonsDefault customer-facing experience

PurchaseUpdated v1.0.5

Process a standard sale transaction. The customer taps their contactless card to complete payment.

Loading...

Authorize (Pre-Authorization)

Hold funds without capturing. Used for hotel bookings, car rentals, and other deferred billing scenarios. Must be captured later using capture() or released using void().

Loading...

Capture

Capture a previously authorized amount. The capture amount can be less than or equal to the authorized amount (partial capture).

Loading...

Refund

Refund a previously completed purchase. Supports full or partial refunds up to the original transaction amount.

Loading...

Void

Void an unsettled transaction (same-day cancellation). Only works for transactions from the current batch/day.

Loading...

Flutter Note

void is a reserved keyword in Dart. The method is named void$() in the Flutter SDK.

Reverse

Reverse a specific transaction. Used when a transaction needs to be undone, typically due to timeout or error during original processing.

Loading...

Reverse Last TransactionNew in v1.0.5

Convenience method to reverse the most recently processed transaction. Throws EdfaException if no reversible transaction exists.

Loading...

TxnResponse Model

The Transaction object returned in callbacks contains the following fields:

FieldTypeDescription
rrnStringRetrieval Reference Number — unique transaction identifier
statusStringTransaction status code
amountStringTransaction amount
cardMaskStringMasked card number (e.g. **** **** **** 1234)
cardholderNameStringName on the card
transactionTypeTransactionTypeThe type of transaction performed
receiptDataString?Receipt data for printing (nullable)