PaymentLeg class

Represents a single payment within a split payment session.

Each leg records the result of one payment attempt (successful or failed) and is displayed in the payment history on the reconciliation screen.

Constructors

PaymentLeg({required String id, required String paymentMethod, required Decimal amount, required bool isSuccess, required DateTime timestamp, String? description, String? reference, Decimal? cashTendered, int? transactionNumber, String? cardType, String? maskedPan, String? paymentStatus, String? batchNumber, String? authResponse, String? authResponseCode, String? authCode, String? entryMode, String? terminalId, String? eventType, String? customerId, String? customerName})
const

Properties

amount → Decimal
The amount paid in this leg.
final
authCode String?
Acquirer auth code.
final
authResponse String?
Acquirer auth response message (free text).
final
authResponseCode String?
Acquirer auth response code.
final
batchNumber String?
Acquirer batch number for the card transaction.
final
cardType String?
Card brand (e.g. 'visa', 'mastercard'). Only set for card payments.
final
cashTendered → Decimal?
The actual amount tendered by the customer for cash payments.
final
customerId String?
Customer ID associated with this payment leg.
final
customerName String?
Customer display name associated with this payment leg.
final
description String?
Optional description provided by the cashier (e.g. 'Customer 1').
final
entryMode String?
Card entry mode (e.g. 'Chip', 'Contactless', 'Swipe').
final
eventType String?
Event type — "Purchase", "Refund", etc. Used to distinguish refund legs from purchase legs in calculations and display.
final
hashCode int
The hash code for this object.
no setterinherited
id String
Unique identifier for this payment leg.
final
isRefund bool
Whether this leg is a refund event.
no setter
isSuccess bool
Whether this payment leg was successful.
final
maskedPan String?
Last 4 / masked PAN as returned by the gateway.
final
paymentMethod String
The payment method used (e.g. 'Card', 'Cash', 'SnapScan').
final
paymentStatus String?
Provider payment status (e.g. 'Approved', 'Declined').
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
reference String?
Provider payment reference / trace ID.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
terminalId String?
Terminal identifier the leg was processed on.
final
timestamp DateTime
Timestamp when this payment was processed.
final
transactionNumber int?
Business-wide transaction number allocated by the backend when the OrderTransaction is created. Null only in the sub-second window before the backend response arrives.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited