PaymentIntent class abstract
A payment intent represents the interaction between the user and the payment form.
For more detailed info see: https://stripe.com/docs/payments/payment-intents.
- Available extensions
- Annotations
-
- @freezed
Constructors
- PaymentIntent.new({required String id, required num amount, required String created, required String currency, required PaymentIntentsStatus status, required String clientSecret, required bool livemode, required CaptureMethod captureMethod, required ConfirmationMethod confirmationMethod, String? paymentMethodId, String? description, String? receiptEmail, String? canceledAt, NextAction? nextAction, ShippingDetails? shipping, MandateData? mandateData, String? latestCharge})
-
constfactory
-
PaymentIntent.fromJson(Map<
String, dynamic> json) -
factory
Properties
- amount → num
-
Amount that will be collected in the payment intent.
no setterinherited
- canceledAt → String?
-
Timestamp since epoch when the intent is cancelled.
no setterinherited
- captureMethod → CaptureMethod
-
How the funds will be caputure from the customer's account.
no setterinherited
- clientSecret → String
-
The client is secret is used for handling the payment from the Client side.
no setterinherited
- confirmationMethod → ConfirmationMethod
-
Method of how the payment will be confirmed.
no setterinherited
-
copyWith
→ $PaymentIntentCopyWith<
PaymentIntent> -
Create a copy of PaymentIntent
with the given fields replaced by the non-null parameter values.
no setterinherited
- created → String
-
Timestamp since epoch that represents the time the intent is created.
no setterinherited
- currency → String
-
The three letter ISO 4217 code for the currency.
no setterinherited
- description → String?
-
Localized description that provides additional context to users.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier.
no setterinherited
- latestCharge → String?
-
The latest charge created by this payment intent.
no setterinherited
- livemode → bool
-
Determines whether the intent is in live mode or in test mode.
no setterinherited
- mandateData → MandateData?
-
Mandata data for this paymentintent.
no setterinherited
- nextAction → NextAction?
-
Additional action that needs to be taken in order to complete a payment
using the provided resource.
no setterinherited
- paymentMethodId → String?
-
Id of the payment method used in this intent.
no setterinherited
- receiptEmail → String?
-
Email address where the receipt will be send to.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shipping → ShippingDetails?
-
Shipping information of the payment intent.
no setterinherited
- status → PaymentIntentsStatus
-
Current status of the intent.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_PaymentIntent value)) → TResult -
Available on PaymentIntent, provided by the PaymentIntentPatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_PaymentIntent value)?) → TResult? -
Available on PaymentIntent, provided by the PaymentIntentPatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_PaymentIntent value)?, {required TResult orElse()}) → TResult -
Available on PaymentIntent, provided by the PaymentIntentPatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> (TResult $default(String id, num amount, String created, String currency, PaymentIntentsStatus status, String clientSecret, bool livemode, CaptureMethod captureMethod, ConfirmationMethod confirmationMethod, String? paymentMethodId, String? description, String? receiptEmail, String? canceledAt, NextAction? nextAction, ShippingDetails? shipping, MandateData? mandateData, String? latestCharge)?, {required TResult orElse()}) → TResult -
Available on PaymentIntent, provided by the PaymentIntentPatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this PaymentIntent to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String id, num amount, String created, String currency, PaymentIntentsStatus status, String clientSecret, bool livemode, CaptureMethod captureMethod, ConfirmationMethod confirmationMethod, String? paymentMethodId, String? description, String? receiptEmail, String? canceledAt, NextAction? nextAction, ShippingDetails? shipping, MandateData? mandateData, String? latestCharge)) → TResult -
Available on PaymentIntent, provided by the PaymentIntentPatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String id, num amount, String created, String currency, PaymentIntentsStatus status, String clientSecret, bool livemode, CaptureMethod captureMethod, ConfirmationMethod confirmationMethod, String? paymentMethodId, String? description, String? receiptEmail, String? canceledAt, NextAction? nextAction, ShippingDetails? shipping, MandateData? mandateData, String? latestCharge)?) → TResult? -
Available on PaymentIntent, provided by the PaymentIntentPatterns extension
A variant ofwhen
that fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited