PaymentIntent constructor

  1. @JsonSerializable(explicitToJson: true)
const PaymentIntent({
  1. required String id,
  2. required num amount,
  3. required String created,
  4. required String currency,
  5. required PaymentIntentsStatus status,
  6. required String clientSecret,
  7. required bool livemode,
  8. required CaptureMethod captureMethod,
  9. required ConfirmationMethod confirmationMethod,
  10. String? paymentMethodId,
  11. String? description,
  12. String? receiptEmail,
  13. String? canceledAt,
  14. NextAction? nextAction,
  15. ShippingDetails? shipping,
  16. MandateData? mandateData,
  17. String? latestCharge,
})

Implementation

@JsonSerializable(explicitToJson: true)
const factory PaymentIntent({
  /// Unique identifier.
  required String id,

  /// Amount that will be collected in the payment intent.
  required num amount,

  /// Timestamp since epoch that represents the time the intent is created.
  required String created,

  /// The three letter ISO 4217 code for the currency.
  required String currency,

  /// Current status of the intent.
  required PaymentIntentsStatus status,

  /// The client is secret is used for handling the payment from the Client side.
  required String clientSecret,

  /// Determines whether the intent is in live mode or in test mode.
  required bool livemode,

  /// How the funds will be caputure from the customer's account.
  required CaptureMethod captureMethod,

  /// Method of how the payment will be confirmed.
  required ConfirmationMethod confirmationMethod,

  /// Id of the payment method used in this intent.
  String? paymentMethodId,

  /// Localized description that provides additional context to users.
  String? description,

  /// Email address where the receipt will be send to.
  String? receiptEmail,

  /// Timestamp since epoch when the intent is cancelled.
  String? canceledAt,

  /// Additional action that needs to be taken in order to complete a payment
  /// using the provided resource.
  NextAction? nextAction,

  /// Shipping information of the payment intent.
  ShippingDetails? shipping,

  /// Mandata data for this paymentintent.
  MandateData? mandateData,

  /// The latest charge created by this payment intent.
  ///
  /// This field is only available on stripe web.
  String? latestCharge,
}) = _PaymentIntent;