Stripe class

Constructors

Stripe(String publishableKey, {String? stripeAccount})
Creates a new Stripe object. Use this constructor if you wish to handle the instance of this class by yourself. Alternatively, use Stripe.init to create a singleton and access it through Stripe.instance.

Properties

api StripeApi
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

authenticatePayment(String paymentIntentClientSecret, BuildContext context) Future<Map<String, dynamic>>
Authenticate a payment. Returns the PaymentIntent. https://stripe.com/docs/payments/payment-intents/android-manual
authenticateSetupIntent(String clientSecret, {String? webReturnPath, required BuildContext context}) Future<Map<String, dynamic>>
Authenticate a SetupIntent https://stripe.com/docs/api/setup_intents/confirm
confirmPayment(String paymentIntentClientSecret, BuildContext context, {String? paymentMethodId}) Future<Map<String, dynamic>>
Confirm and authenticate a payment. Returns the PaymentIntent. https://stripe.com/docs/payments/payment-intents/android
confirmPaymentWithApplePay(BuildContext context, {required String paymentIntentClientSecret, required Map<String, dynamic> paymentResult}) Future<Map<String, dynamic>>
Confirm and authenticate a payment with Apple Pay. paymentResult must be the result of requesting a Apple Pay payment with the pay library. Returns the PaymentIntent.
confirmPaymentWithGooglePay(BuildContext context, {required String paymentIntentClientSecret, required Map<String, dynamic> paymentResult}) Future<Map<String, dynamic>>
Confirm and authenticate a payment with Google Pay. /// paymentResult must be the result of requesting a Google Pay payment with the pay library. Returns the PaymentIntent.
confirmSetupIntent(String clientSecret, String paymentMethod, {String? webReturnPath, required BuildContext context}) Future<Map<String, dynamic>>
Confirm and authenticate a SetupIntent https://stripe.com/docs/api/setup_intents/confirm
getReturnUrlForSca({String? webReturnUrl}) String
Creates a return URL that can be used to authenticate a single PaymentIntent. This should be set on the intent before attempting to authenticate it.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance Stripe
Access the instance of Stripe by calling Stripe.instance. Throws an Exception if Stripe.init hasn't been called previously.
no setter

Static Methods

init(String publishableKey, {String? stripeAccount}) → void
Initializes the singleton instance of Stripe. Afterwards you can use Stripe.instance to access the created instance.