GatewayHandoffResponse class
Provider-neutral response carried back from the merchant's gateway client.
Strict allow-list. The SDK does not surface processor-specific fields here. Anything the backend returns beyond this set is opaque to the SDK and must reach the POS through its own backend API. This boundary keeps the SDK from leaking processor-specific assumptions into the unified contract.
Allowed fields:
- status — canonical gateway outcome.
- approved — convenience boolean derived from the gateway's response. The POS should still consult status / responseCode for authoritative routing.
- transactionId — gateway-issued transaction id.
- responseCode — gateway response code (e.g. ISO 8583 response code, "00" for success, etc.).
- responseMessage — gateway-phrased human-readable message. Suitable for receipts only when the gateway phrased it; do not rewrite.
- receiptReference — optional, opaque receipt / reference id the gateway returned (e.g. an EMV transaction reference).
All other gateway / processor fields (auth code, EMV
response scripts, network transaction id, raw payload)
belong on GatewayTransactionResponse (the existing
em-api-flavoured model) - they reach the POS through its
own backend, not the SDK.
Constructors
- GatewayHandoffResponse({required GatewayHandoffStatus status, bool? approved, String? transactionId, String? responseCode, String? responseMessage, String? receiptReference})
-
const
-
GatewayHandoffResponse.fromJson(Map<
String, dynamic> json) -
Parse from JSON. Like GatewayTransactionRequest, the
factory rejects any banned key surfacing so a backend
that accidentally returns track / PAN data cannot
silently propagate it into the unified contract.
factory
Properties
- approved → bool?
-
Optional convenience boolean.
nullwhen the gateway did not return a clear approval boolean (e.g. pending async processing).final - hashCode → int
-
The hash code for this object.
no setterinherited
- receiptReference → String?
-
Opaque receipt / reference id.
final
- responseCode → String?
-
Gateway response code.
final
- responseMessage → String?
-
Gateway-phrased message.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → GatewayHandoffStatus
-
Canonical outcome status.
final
- transactionId → String?
-
Gateway-assigned transaction id.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
bannedKeysForTest(
) → Set< String>