flutter_stripe
flutter_stripe copied to clipboard
Payment Method Id not saving on stripe
Describe the bug presentPaymentSheet card selection doesn't record the selected payment method id in the stripe backend.
To Reproduce Steps to reproduce the behavior:
- Call paymentIntent api
- pass the necessary information into SetupPaymentSheetParaments for stripe initPaymentSheet
- Await for stripe presentPaymentSheet
- select an available card.
- check payment in stripe development
- status is still waiting for payment method.
Expected behavior I expect at this stage of selecting a credit card it suppose to be logged in the stripe api with the selected payment method. If I were to call the confirmPaymentSheetPayment, it saves the payment method id but it also processes the payment which is not what I want.
Smartphone / tablet
- Samsung S9+
- Android 10
- Flutter Stripe 5.1.0
- Flutter version 3.3.4
Additional context code being used await stripe.initPaymentSheet( paymentSheetParameters: SetupPaymentSheetParameters( customFlow: true, allowsDelayedPaymentMethods: true, merchantDisplayName: 'Business Name', setupIntentClientSecret: _checkoutRequest?.clientSecret, customerEphemeralKeySecret: _checkoutRequest?.ephemeralKey, customerId: _checkoutRequest?.customerId, ), ); await stripe.presentPaymentSheet();
If what you need is to store the payment information and not process the payment directly. You should be using the SetupIntents api: https://stripe.com/docs/payments/setup-intents
With the PaymentIntent the payment Method id is registered when the payment is processed