Stripe class

Stripe is the facade of the library and exposes the operations that can be executed on the Stripe platform.

Properties

debugConfigurePlatformOrderTrackingCalled bool
getter/setter pair
debugUpdatePlatformSheetCalled bool
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isPlatformPaySupportedListenable ValueListenable<bool>
Exposes a ValueListenable whether or not GooglePay (on Android) or Apple Pay (on iOS) is supported for this device.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

applySettings() Future<void>
Reconfigures the Stripe platform by applying the current values for publishableKey, merchantIdentifier, stripeAccountId, threeDSecureParams, urlScheme
canAddCardToWallet(CanAddCardToWalletParams params) Future<CanAddCardToWalletResult>
check if a particular card can be provisioned with the current app on this particular device. Throws StripeException in case creating the token fails.
canAddToWallet(String last4) Future<AddToWalletResult>
check if a particular card can be provisioned with the current app on this particular device.
collectBankAccount({required bool isPaymentIntent, required String clientSecret, required CollectBankAccountParams params}) Future<PaymentIntent>
Collect the bankaccount details for the payment intent.
collectBankAccountToken({required String clientSecret}) Future<FinancialConnectionTokenResult>
Call the financial connections authentication flow in order to collect a US bank account to enhance payouts.
collectFinancialConnectionsAccounts({required String clientSecret}) Future<FinancialConnectionSessionResult>
Call the financial connections authentication flow in order to collect the user account data.
configurePlatformOrderTracking({required PlatformPayOrderDetails orderDetails}) Future<void>
Updates the native payment sheet with new order tracking information **iOS-only.
confirmPayment({required String paymentIntentClientSecret, PaymentMethodParams? data, PaymentMethodOptions? options}) Future<PaymentIntent>
Confirms a payment method, using the provided paymentIntentClientSecret and data.
confirmPaymentSheetPayment() Future<void>
Confirms the paymentsheet payment
confirmPlatformPayPaymentIntent({required String clientSecret, required PlatformPayConfirmParams confirmParams}) Future<PaymentIntent>
Launches the relevant native wallet sheet (Apple Pay on iOS an Google Pay on Android) in order to confirm a Stripe payment intent.
confirmPlatformPaySetupIntent({required String clientSecret, required PlatformPayConfirmParams confirmParams}) Future<SetupIntent>
Launches the relevant native wallet sheet (Apple Pay on iOS and Google Pay on Android) in order to confirm a Stripe setup intent.
confirmSetupIntent({required String paymentIntentClientSecret, required PaymentMethodParams params, PaymentMethodOptions? options}) Future<SetupIntent>
Confirm the SetupIntent using the paymentIntentClientSecret and params.
createApplePayToken(Map<String, dynamic> payment) Future<TokenData>
Creates a single-use token that represents an Apple Pay credit card’s details.
createGooglePayPaymentMethod(CreateGooglePayPaymentParams params) Future<PaymentMethod>
Create a payment method for google pay.
createPaymentMethod({required PaymentMethodParams params, PaymentMethodOptions? options}) Future<PaymentMethod>
Converts payment information defined in params into a PaymentMethod object that can be passed to your server.
createPlatformPayPaymentMethod({required PlatformPayPaymentMethodParams params, bool usesDeprecatedTokenFlow = false}) Future<PlatformPayPaymentMethod>
Laucnhes the relevant native wallsheet (Apple Pay on iOS and Google Pay on Android) in order to create a payment intent
createToken(CreateTokenParams params) Future<TokenData>
Creates a single-use token that represents a credit card’s details.
createTokenForCVCUpdate(String cvc) Future<String?>
Creates a token that represents an updated CVC.
dangerouslyUpdateCardDetails(CardDetails card) Future<void>
Updates the internal card details. This method will not validate the card information so you should validate the information yourself. WARNING!!! Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance
handleNextAction(String paymentIntentClientSecret, {String? returnURL}) Future<PaymentIntent>
Use this method in case the PaymentIntent status is PaymentIntentsStatus.RequiresAction. Executing this action can take several seconds and it is important to not resubmit the form.
handleNextActionForSetupIntent(String setupIntentClientSecret, {String? returnURL}) Future<SetupIntent>
Use this method in case the SetupIntent status is PaymentIntentsStatus.RequiresAction. Executing this action can take several seconds and it is important to not resubmit the form.
handleURLCallback(String url) Future<bool>
Handle URL callback from iDeal payment returnUrl to close iOS in-app webview
initCustomerSheet({required CustomerSheetInitParams customerSheetInitParams}) Future<CustomerSheetResult?>
Initializes the customer sheet with the provided parameters.
initGooglePay(GooglePayInitParams params) Future<void>
Inititialise google pay
initPaymentSheet({required SetupPaymentSheetParameters paymentSheetParameters}) Future<PaymentSheetPaymentOption?>
Initializes the payment by providing a configuration
intentCreationCallback(IntentCreationCallbackParams params) Future<void>
Method used to confirm to the user that the intent is created successfull or not successfull when using a defferred payment method.
isCardInWallet(String cardLastFour) Future<IsCardInWalletResult>
check if a particular card can be provisioned with the current app on this particular device. Throws StripeException in case creating the token fails.
isGooglePaySupported(IsGooglePaySupportedParams params) Future<bool>
Determines if Google Pay is supported on the device
isPlatformPaySupported({IsGooglePaySupportedParams? googlePay, PlatformPayWebPaymentRequestCreateOptions? webPaymentRequestCreateOptions}) Future<bool>
Check if the relevant native wallet (Apple Pay on iOS and Google Pay on Android) is supported.
markNeedsSettings() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openApplePaySetup() Future<void>
Opens the UI to set up credit cards for Apple Pay.
presentCustomerSheet({CustomerSheetPresentParams? options}) Future<CustomerSheetResult?>
Display the customersheet sheet. With the provided options.
presentGooglePay(PresentGooglePayParams params) Future<void>
Setup google pay.
presentPaymentSheet({PaymentSheetPresentOptions? options}) Future<PaymentSheetPaymentOption?>
Displays the paymentsheet
resetPaymentSheetCustomer() Future<void>
Call this method when the user logs out from your app.
retrieveCustomerSheetPaymentOptionSelection() Future<CustomerSheetResult?>
Retrieve the customer sheet payment option selection.
retrievePaymentIntent(String clientSecret) Future<PaymentIntent>
Retrieves a PaymentIntent using the provided clientSecret.
retrieveSetupIntent(String clientSecret) Future<SetupIntent>
Retrieves a SetupIntent using the provided clientSecret.
toString() String
A string representation of this object.
inherited
updatePlatformSheet({required PlatformPaySheetUpdateParams params}) Future<void>
Updates the native payment sheet with new data **iOS-only.
verifyPaymentIntentWithMicrodeposits({required bool isPaymentIntent, required String clientSecret, required VerifyMicroDepositsParams params}) Future<PaymentIntent>
Verify the bank account with microtransactions

Operators

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

Static Properties

buildPaymentRequestButton Widget Function({BoxConstraints? constraints, Key? key, required VoidCallback onPressed, required PlatformPayWebPaymentRequestCreateOptions paymentRequestCreateOptions, PlatformButtonStyle? style, PlatformButtonType? type})
final
buildWebCard Widget Function({bool autofocus = false, BoxConstraints? constraints, required CardEditController controller, bool dangerouslyUpdateFullCardDetails = false, bool enablePostalCode = false, FocusNode? focusNode, double? height, Key? key, CardChangedCallback? onCardChanged, CardFocusCallback? onFocus, CardPlaceholder? placeholder, CardStyle? style, double? width})
final
instance Stripe
final
merchantIdentifier String?
Retrieves the merchant identifier.
getter/setter pair
publishableKey String
Retrieves the publishable API key.
getter/setter pair
setReturnUrlSchemeOnAndroid bool?
Retrieves the setReturnUrlSchemeOnAndroid parameter
getter/setter pair
stripeAccountId String?
Retrieves the id associate with the Stripe account.
getter/setter pair
threeDSecureParams ThreeDSecureConfigurationParams?
Retrieves the configuration parameters for 3D secure.
getter/setter pair
urlScheme String?
Retrieves the custom url scheme
getter/setter pair