Transaction History
Retrieve and display transaction history for the current terminal. Access detailed information about past transactions including receipts.
Overview
Retrieve transaction records with optional pagination. Access detailed information for individual transactions by their transaction number.
txnHistory()
Retrieve a list of transactions with optional pagination.
txnDetail()
Get detailed information for a specific transaction.
On docs.edfapay.com
For a back office, the same transactions are in the dashboard and its reports: Transactions.
Pagination
For large transaction volumes, pass a Pagination. A Pagination defaults to pageNumber 0, pageSize 50, newest first. The response is the list for that page only, with no total count: request the next pageNumber until a page comes back with fewer than pageSize transactions.
Get Transaction History
Retrieve past transactions for the current terminal, one page at a time when you pass a Pagination. In Kotlin and Java, onSuccess receives the page as a List of Transaction. In Flutter and React Native, onSuccess receives a map whose value key holds the list; each transaction is a map with the keys listed under Transaction Model.
Loading...Pagination
Pagination is optional. Pass one to choose the page; without one, the request is sent without paging fields. Kotlin and Flutter take named arguments with defaults. Java: new Pagination() for the defaults, or all four arguments in the order pageNumber, sortOrder, pageSize, sortBy. React Native: new Pagination(pageNumber, pageSize, sortOrder, sortBy), all optional.
| Parameter | Type | Default | Description |
|---|---|---|---|
| pageNumber | Int | 0 | Page index (the SDK default is 0) |
| pageSize | Int | 50 | Transactions per page |
| sortOrder | Pagination.Sort (Flutter, React Native: SortOrder) | DESCENDING | ASCENDING (oldest first) or DESCENDING (newest first) |
| sortBy | Pagination.Field (Flutter, React Native: SortField) | CREATED | Sort field: CREATED (creation date) is the only value |
Get Transaction Detail
Retrieve full details of one transaction. Pass its transaction number as txnId: transactionNumber in Kotlin and Java, the transaction_number key in Flutter and React Native, for example from a transaction returned by txnHistory().
Loading...Transaction Search & StatusNew in v1.0.7
searchTxnApi() accepts a map of search parameters (e.g. rrn, transaction_number, created_date), sends each value as text, and returns the first page of matching transactions (an empty list when nothing matches). Use it to locate an original transaction before a refund when you only have partial information. txnDetailApi() returns one transaction by its id. pgTxnStatusApi() returns the status of a payment-gateway transaction; its sessionId is the payment-gateway session id. These three calls return a different model from txnHistory(): TransactionApi (search, detail) and PgTxnStatus (status).
Loading...Merchant API key required
searchTxnApi(), txnDetailApi() and pgTxnStatusApi() need the merchant API key in your credentials before initiate() (see Initialization, API key).
Transaction Model
Properties of each Transaction returned by txnHistory() and txnDetail(). Flutter and React Native receive each transaction as a map with the keys in the second column. Java reads each field with its getter, for example getRrn(). In Kotlin and Java, formattedAmount(currency) returns the amount followed by the transaction's currency, or by the currency you pass when the transaction has none, and transactionType() returns operationType as a TransactionType.
| Kotlin, Java (field) | Flutter, React Native (map key) | Type | Description |
|---|---|---|---|
| transactionNumber | transaction_number | String? | Transaction id; pass it to txnDetail() |
| rrn | rrn | String? | Retrieval Reference Number |
| authCode | auth_code | String? | Authorization code from issuer |
| amount | amount | String | Transaction amount |
| currency | currency | String? | Currency code (ISO 4217 numeric, e.g. 682 for SAR) |
| status | status | String | Transaction status |
| operationType | operation_type | String? | Type (PURCHASE, REFUND, etc.) |
| cardNumber | credit_number | String | Card number (partially masked) |
| scheme_id | scheme | String? | Card scheme identifier |
| formattedScheme | formatted_scheme | String? | Card brand (Visa, Mastercard, etc.) |
| cardholderName | cardholder_name | String? | Name on card |
| createdDate | created_date | String | Transaction creation date |
| formattedCreatedDate | formatted_created_date | String? | Formatted date |
| formattedCreatedTime | formatted_created_time | String? | Formatted time |
| finishDate | finish_date | String? | Finish date as sent by the server |
| merchantId | merchant_id | String? | Merchant identifier |
| acquirerMerchantId | mada_merchant_id | String? | Acquirer merchant identifier |
| acquirerTerminalId | mada_terminal_id | String? | Acquirer terminal identifier |
| responseMessageCode | response_message_code | String? | Response code from the server |
| isRefundedOrCancelled | already_refunded_or_cancelled | Boolean? | Whether the transaction was already refunded or cancelled |
On this page
Downloads
Coming SoonSample apps, release bundles, and more content will be available here soon.