Reporting
Last updated: 2026-03-13
Available Operations
| Operation | Intent Action | Description |
|---|---|---|
| Transaction History | se.westpay.softpos.VIEW_HISTORY | Retrieve a list of transactions for a date range. |
| Last Transaction | se.westpay.softpos.GET_LAST_TRANSACTION | Get the details of the most recently processed transaction. |
Notes
- Date ranges for transaction history must use the
yyyy-MM-ddformat. - Transaction history response is returned as a JSON string in the
txnHistoryResponseextra. - The last transaction response uses the same extras as a standard transaction result.
Parsing Transaction History
The txnHistoryResponse extra is a JSON string with the following structure:
json{ "status": "OK", "transactionList": [ { "acqRef": 123456789, "terminalId": "T001", "transactionDateTime": "2025-01-06T10:30:00", "formattedAmount": "100,50 SEK", "card": "****1234", "paymentNetwork": "Visa", "txnStatus": "Approved", "transactionType": "Purchase" } ], "transactionSummary": { "totalPurchaseAmount": 100.50, "totalRefundAmount": 0.00 } }
Parse it safely with a try-catch block:
kotlinfun handleTransactionHistoryResult(data: Intent?) { val historyJson = data?.getStringExtra("txnHistoryResponse") try { val history = Gson().fromJson(historyJson, TransactionHistoryResponse::class.java) history?.transactionList?.forEach { transaction -> // Process each transaction } history?.transactionSummary?.let { summary -> Log.d("Summary", "Total Purchases: ${summary.totalPurchaseAmount}") } } catch (e: Exception) { Log.e("SoftPOS", "Error parsing transaction history", e) } }