Transaction Requests
Last updated: 2026-03-13
Available Operations
| Operation | Intent Action | Description |
|---|---|---|
| Purchase | se.westpay.softpos.PURCHASE | Process a contactless card payment. |
| Refund | se.westpay.softpos.REFUND | Refund a previous payment. |
| Reversal | se.westpay.softpos.REVERSAL | Reverse the last processed transaction. |
Common Response Extras
All transaction intents return the following extras on RESULT_OK:
| Extra | Type | Description |
|---|---|---|
isSuccess | boolean | true if the transaction was approved. |
amount | string | Transaction amount (comma decimal separator, e.g. "100,50"). |
currencyId | string | ISO 4217 numeric currency code. |
transactionId | string | Unique transaction identifier. |
terminalId | string | ID of the terminal that processed the transaction. |
acqRefNumber | long | Acquirer reference number. |
cardType | string | Card network name (e.g. Visa, Mastercard). |
maskedCardPan | string | Masked card number (e.g. ****1234). |
type | string | Transaction type (e.g. Purchase, Refund). |
status | string | Transaction status. See Error Handling. |
time | string | Transaction timestamp. |
denialReason | string | Denial reason if the transaction failed. See Error Handling. |
error | string | Error code. See Error Handling. |
receiptDetails | string | JSON string containing receipt data for printing. |
Receipt Details
The receiptDetails extra is a JSON string containing fields such as:
json{ "acqRef": 123456789, "terminalId": "T001", "transactionDateTime": "2025-01-06T10:30:00", "formattedAmount": "100,50 SEK", "card": "****1234", "paymentNetwork": "Visa", "txnStatus": "Approved", "transactionType": "Purchase" }
Parse it safely with a try-catch block:
kotlinfun parseReceiptDetails(jsonString: String?): ReceiptDetails? { return try { jsonString?.let { Gson().fromJson(it, ReceiptDetails::class.java) } } catch (e: Exception) { Log.e("SoftPOS", "Error parsing receipt details", e) null } }