|
| 1 | +part of '../../../messages.dart'; |
| 2 | + |
| 3 | +@JsonSerializable() |
| 4 | +class ConfirmPaymentIntentRequest { |
| 5 | + /// ID of the payment method (a PaymentMethod, Card, or compatible Source |
| 6 | + /// object) to attach to this PaymentIntent. |
| 7 | + final String? paymentMethod; |
| 8 | + |
| 9 | + /// Email address that the receipt for the resulting payment will be sent to. |
| 10 | + /// If receipt_email is specified for a payment in live mode, a receipt will |
| 11 | + /// be sent regardless of your email settings. |
| 12 | + final String? receiptEmail; |
| 13 | + |
| 14 | + /// Indicates that you intend to make future payments with this |
| 15 | + /// PaymentIntent’s payment method. |
| 16 | + /// |
| 17 | + /// If you provide a Customer with the PaymentIntent, you can use this |
| 18 | + /// parameter to attach the payment method to the Customer after the |
| 19 | + /// PaymentIntent is confirmed and the customer completes any required |
| 20 | + /// actions. If you don’t provide a Customer, you can still attach the |
| 21 | + /// payment method to a Customer after the transaction completes. |
| 22 | + /// |
| 23 | + /// If the payment method is card_present and isn’t a digital wallet, Stripe |
| 24 | + /// creates and attaches a generated_card payment method representing the |
| 25 | + /// card to the Customer instead. |
| 26 | + /// |
| 27 | + /// When processing card payments, Stripe uses setup_future_usage to help you |
| 28 | + /// comply with regional legislation and network rules, such as SCA. |
| 29 | + /// |
| 30 | + /// If you’ve already set setup_future_usage and you’re performing a request |
| 31 | + /// using a publishable key, you can only update the value from on_session to |
| 32 | + /// off_session. |
| 33 | + final SetupFutureUsage? setupFutureUsage; |
| 34 | + |
| 35 | + /// ID of the ConfirmationToken used to confirm this PaymentIntent. |
| 36 | + /// |
| 37 | + /// If the provided ConfirmationToken contains properties that are also being |
| 38 | + /// provided in this request, such as payment_method, then the values in |
| 39 | + /// this request will take precedence. |
| 40 | + final String? confirmationToken; |
| 41 | + |
| 42 | + /// Set to true to fail the payment attempt if the PaymentIntent transitions |
| 43 | + /// into requires_action. This parameter is intended for simpler integrations |
| 44 | + /// that do not handle customer actions, like saving cards without |
| 45 | + /// authentication. |
| 46 | + final bool? errorOnRequiresAction; |
| 47 | + |
| 48 | + /// ID of the mandate that’s used for this payment. |
| 49 | + final String? mandate; |
| 50 | + |
| 51 | + /// Set to true to indicate that the customer isn’t in your checkout flow |
| 52 | + /// during this payment attempt and can’t authenticate. Use this parameter in |
| 53 | + /// scenarios where you collect card details and charge them later. |
| 54 | + final bool? offSession; |
| 55 | + |
| 56 | + /// The URL to redirect your customer back to after they authenticate or |
| 57 | + /// cancel their payment on the payment method’s app or site. If you’d prefer |
| 58 | + /// to redirect to a mobile application, you can alternatively supply an |
| 59 | + /// application URI scheme. This parameter is only used for cards and other |
| 60 | + /// redirect-based payment methods. |
| 61 | + final String? returnUrl; |
| 62 | + |
| 63 | + /// Set to true when confirming server-side and using Stripe.js, iOS, or |
| 64 | + /// Android client-side SDKs to handle the next actions. |
| 65 | + final bool? useStripeSdk; |
| 66 | + |
| 67 | + ConfirmPaymentIntentRequest({ |
| 68 | + this.paymentMethod, |
| 69 | + this.receiptEmail, |
| 70 | + this.setupFutureUsage, |
| 71 | + this.confirmationToken, |
| 72 | + this.errorOnRequiresAction, |
| 73 | + this.mandate, |
| 74 | + this.offSession, |
| 75 | + this.returnUrl, |
| 76 | + this.useStripeSdk, |
| 77 | + }); |
| 78 | + |
| 79 | + factory ConfirmPaymentIntentRequest.fromJson(Map<String, dynamic> json) => |
| 80 | + _$ConfirmPaymentIntentRequestFromJson(json); |
| 81 | + |
| 82 | + Map<String, dynamic> toJson() => _$ConfirmPaymentIntentRequestToJson(this); |
| 83 | +} |
0 commit comments