#inoSoma
1 messages · Page 1 of 1 (latest)
Hi
For Google/Apple Pay, you can simply disable showing these PaymentMethods
For detecting Debit/Credit cards not sure if that's possible, let me check...
OK in the PaymentMethod object, at card level I can see funding which give you info if the card is debit or credit:
https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-funding
So what you need to do is to collect the PaymentMethod first, check the card's funding and then see if you charge the user (debit or not) or throw an error
There is a beta feature for collecting the PaymentMethod before creating the PaymentIntent in mobile:
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=mobile
You can ask to join that beta if you are interested
I can check that but when i returned client secret to flutter and user entered his card, directly set "status": "succeeded". I have check service and webhook for second control. when i retrieve the payment detail and check paymentmethods funding, then i try to cancel but it says already succeeded.
Yes you need to follow the flow I mentioned above. Collect PaymentMethod first then create the PaymentIntent
Or you can use SetupIntents, collect payment method, do your checks then create the PaymentIntent and charge the card:
https://stripe.com/docs/payments/save-and-reuse?platform=android&ui=payment-sheet
In flutter you can do something like this:
https://github.com/flutter-stripe/flutter_stripe/blob/main/example/lib/screens/others/setup_future_payment_screen.dart
Then charge the saved payment method after doing the checks in your backend:
https://stripe.com/docs/payments/save-and-reuse?platform=android&ui=payment-sheet#charge-saved-payment-method
thanks i will try