PaymentSessionDetails class

Details of a payment session; drives the payment sheet's method list, countdown, and attempts display. Intentionally has no clientSecret field - the SDK never calls paymentsession/get directly.

Constructors

PaymentSessionDetails({required String paymentSessionGuid, required List<PaymentCategory> categories, Map<PaymentCategory, int> categoryIds = const {}, int expiryMinutes = 15, int remainingAttempts = 3, List<PaymentChannel> channels = const [], List<PaymentBank> banks = const [], List<SavedWallet> savedWallets = const [], List<SavedCard> savedCards = const [], String? clientId})
PaymentSessionDetails.fromJson(Map<String, dynamic> json)
Parses the data object of a paymentsession/get response - pass json['data'], not the full response.
factory

Properties

banks → List<PaymentBank>
Banks enabled for this session, scoped per channelCode - drives the Bank Account form's dropdown.
final
categories → List<PaymentCategory>
Payment methods enabled for this session - drives the "Choose Payment Method" tiles.
final
categoryIds → Map<PaymentCategory, int>
PaymentCategory's numeric id, sent as categoryId on every ProcessPayment call.
final
channels → List<PaymentChannel>
Wallet channels enabled for this session - drives the Wallet form's provider selector.
final
clientId → String?
Sent as clientId on every ProcessPayment call; nullable so an older backend doesn't hard-fail.
final
expiryMinutes → int
How many minutes the session is valid for - drives the sheet's countdown timer.
final
hashCode → int
The hash code for this object.
no setterinherited
paymentSessionGuid → String
final
remainingAttempts → int
How many payment attempts remain on this session.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
savedCards → List<SavedCard>
Cards previously saved via doCardOnFile: true.
final
savedWallets → List<SavedWallet>
Wallet accounts the customer previously saved - lets them skip re-typing an account number.
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