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 card payment operations covering the complete transaction lifecycle, plus invoice-based payments (BNPL & Checkout) as of v1.0.7.

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...

isFlowComplete

onPaymentProcessComplete can fire up to 3 times depending on the FlowType (e.g. once when the card is processed, again when the server responds, and finally when the result screen closes). Always gate post-payment logic on isFlowComplete == true — earlier invocations carry intermediate state.

Common Pitfall

Navigating away or granting goods on the first callback invocation can double-process orders. Only treat the transaction as final when both status and isFlowComplete are true.

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...

Invoice Payment (BNPL & Checkout)New in v1.0.7

Process an invoice-based payment through Buy-Now-Pay-Later providers (Tamara, Tabby) or a Checkout payment link, selected via the PaymentMethod enum. The request carries the order, customer contact, invoice line items, and store information; the response returns the checkout id, deeplink, and transaction ids.

PaymentMethodSerialized ValueFlow
TAMARAtamaraBNPL via Tamara (pay by instalments)
TABBYtabbyBNPL via Tabby (pay by instalments)
CHECKOUTcheckoutPayment-gateway checkout link
CONTACTLESScontactlessSoft POS tap-to-pay (response mapping)
Loading...

Replaces the BNPL API

invoicePayment() replaces buyNowPayLater() and invoiceRefund() replaces checkoutLinkApi() (both removed in Flutter v1.0.7; deprecated aliases remain in React Native). The provider enum BnplProvider was renamed to PaymentMethod.

Invoice Refund

Refund an invoice payment by transaction id. Replaces the removed checkoutLinkApi().

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
cardNumberStringMasked card number (e.g. **** **** **** 1234)
cardholderNameString?Name on the card
transactionType()TransactionType?The type of transaction performed (accessor method, derived from operationType)
qrDataString?QR code data for the receipt (nullable)