Intent API data models

Field tables for Intent API response and error models returned in listener callbacks.

PosTransactionSummary

Sale and refund responses use PosTransactionSummary.

FieldTypeNotes
amountLongCents
otherAmountLongCashback or secondary amount
currencyCodePosCurrencyCodeGBP, USD, EUR, PLN, ZAR
referenceIdString
transactionIdStringUUID
isApprovedBoolean
transactionResultStringFor example, approved_confirmed
rrnString
transactionTimeStringISO-8601
manufacturerSerialNumberStringDefault ""
clientReferenceIdStringDefault ""
transactionTypePosTransactionTypeSALE, REFUND, and so on
transactionInfoMap<String, Any>?
posDataMap<String, String>?Includes merchantTransactionId when set
linkMap<String, String>?Payment Link metadata
linkIdString?Payment Link ID

PosTransactionResult (history or lookup)

Returned by searchTransaction and related lookup operations.

FieldType
idString
refString
amountInt
transactionResultString
transactionTypeString
approvedBoolean
createdDateString
dateObjectDate?
transactionInfoMap<String, Any>?
isVoidableBoolean
isRefundableBoolean

VoidResponse

Void operations return VoidResponse - there is no isApproved field.

FieldType
transactionIdString
transactionResultString
responseCodeString

IntentError

FieldType
errorCodeIntentErrorCode
errorDescriptionString

Helper: IntentError.title() - human title for CODE_CANCELLED, else enum name. See Intent error codes.

Success evaluation

OperationModelSuccess
SalePosTransactionSummarytransactionType is SALE or SALE_WITH_CASHBACK and isApproved == true
RefundPosTransactionSummarytransactionType == REFUND and isApproved == true
VoidVoidResponsetransactionResult indicates success

Validation rules

RuleApplies toBehaviour
amount > 0 && amount < maxTransactionAmountSale, SaleWithCashbackINVALID_AMOUNT via listener
amount valid (non-zero, below max)RefundINVALID_AMOUNT
transactionId non-emptyRefund, VoidINVALID_TRANSACTION_ID
TRANSACTION_RESULT_COUNT present and integerSearchINVALID_LIMIT if bad
TRANSACTION_AMOUNT numeric if presentSearchINVALID_AMOUNT if bad
externalPosData valuesAll maps on IntentConfigMust be string, number, or boolean