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.

https://stripe.com/docs/payments/payment-methods for more info.

Annotations
  • @freezed

Constructors

PaymentMethod({required String id, @Default("payment_method") String object, BillingDetails? billingDetails, String? customer, @Default({}) Map<String, dynamic> metadata, @Default(true) bool livemode, int? created, CardPaymentMethod? card, SepaDebit? sepaDebit, BacsDebit? bacsDebit, AuBecsDebit? auBecsDebit, Sofort? sofort, Ideal? ideal, Fpx? fpx, Upi? upi, UsBankAccount? usBankAccount, required PaymentMethodType type})
const
factory
PaymentMethod.fromJson(Map<String, dynamic> json)
factory

Properties

auBecsDebit AuBecsDebit?
Containing additional data in case paymentmethod type is Aubecs debit.
no setterinherited
bacsDebit BacsDebit?
Containing additional data in case paymentmethod type is Bacs debit.
no setterinherited
billingDetails BillingDetails?
Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
no setterinherited
card CardPaymentMethod?
Containing additional data in case paymentmethod type is card.
no setterinherited
copyWith → $PaymentMethodCopyWith<PaymentMethod>
no setterinherited
created int?
Time at which the object was created. Measured in seconds since the Unix epoch.
no setterinherited
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.
no setterinherited
fpx Fpx?
Containing additional data in case paymentmethod type is FPX.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
Unique identifier for the object.
no setterinherited
ideal Ideal?
Containing additional data in case paymentmethod type is Ideal.
no setterinherited
livemode bool
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
no setterinherited
metadata Map<String, dynamic>
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
no setterinherited
object String
String representing the object’s type. Objects of the same type share the same value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sepaDebit SepaDebit?
Containing additional data in case paymentmethod type is sepa.
no setterinherited
sofort Sofort?
Containing additional data in case paymentmethod type is sofort.
no setterinherited
type PaymentMethodType
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.
no setterinherited
upi Upi?
Containing additional data in case paymentmethod type is UPI.
no setterinherited
usBankAccount UsBankAccount?
no setterinherited

Methods

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

Operators

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