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.
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
4. Settlement & Finality
End-of-day reconciliation pushes funds to your merchant account.
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.
| Type | Description | Requires originalTransaction | Force PIN |
|---|---|---|---|
| TransactionType.PURCHASE | Standard sale transaction | No | No |
| TransactionType.AUTHORIZE | Pre-authorization (hold funds) | No | No |
| TransactionType.CAPTURE | Capture pre-authorized amount | Yes | No |
| TransactionType.REFUND | Refund a previous purchase | Yes | No |
| TransactionType.REVERSAL | Reverse/cancel a transaction | Yes | No |
| TransactionType.VOID | Void unsettled transaction | Yes | No |
| TransactionType.CASHBACK | Purchase with cashback | No | No |
| TransactionType.CHANGE_PIN | PIN change operation | No | Yes |
| TransactionType.CARD_ACTIVATION | Activate a new card | No | Yes |
Flow Types
FlowType controls the UI experience shown to the user during transaction processing.
| FlowType | Description | Use Case |
|---|---|---|
| FlowType.IMMEDIATE | Minimal UI, closes immediately, callback fires with isFlowComplete=true | Background/silent transactions |
| FlowType.STATUS | Shows transaction status briefly then closes | Simple feedback |
| FlowType.DETAIL | Full transaction details and receipt with action buttons | Default 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.
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.
| PaymentMethod | Serialized Value | Flow |
|---|---|---|
| TAMARA | tamara | BNPL via Tamara (pay by instalments) |
| TABBY | tabby | BNPL via Tabby (pay by instalments) |
| CHECKOUT | checkout | Payment-gateway checkout link |
| CONTACTLESS | contactless | Soft 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:
| Field | Type | Description |
|---|---|---|
| rrn | String | Retrieval Reference Number — unique transaction identifier |
| status | String | Transaction status code |
| amount | String | Transaction amount |
| cardNumber | String | Masked card number (e.g. **** **** **** 1234) |
| cardholderName | String? | Name on the card |
| transactionType() | TransactionType? | The type of transaction performed (accessor method, derived from operationType) |
| qrData | String? | QR code data for the receipt (nullable) |
On this page
Downloads
Coming SoonSample apps, release bundles, and more content will be available here soon.