PaymentMethod class
PaymentMethod objects represent your customer’s payment instruments. You can use them with PaymentIntents to collect payments or save them to Customer objects to store instrument details for future payments.
Constructors
- PaymentMethod({required String id, required bool livemode, required String type, required BillingDetails billingDetails, String? customer, PaymentMethodCard? card, PaymentMethodUsBankAccount? usBankAccount})
-
PaymentMethod.fromJson(Map<
String, dynamic> json) -
factory
Properties
- billingDetails → BillingDetails
-
Billing information associated with the PaymentMethod that may be used or
required by particular types of payment methods.
final
- card → PaymentMethodCard?
-
If this is a card PaymentMethod, this hash contains the user’s card
details.
final
- customer → String?
-
The ID of the Customer to which this PaymentMethod is saved. This will
not be set when the PaymentMethod has not been saved to a Customer.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier for the object.
final
- livemode → bool
-
Has the value true if the object exists in live mode or the value false
if the object exists in test mode.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
The type of the PaymentMethod. An additional hash is included on the
PaymentMethod with a name matching this value. It contains additional
information specific to the PaymentMethod type.
final
- usBankAccount → PaymentMethodUsBankAccount?
-
If this is an us_bank_account PaymentMethod, this hash contains details
about the US bank account payment method.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited