#iamhein
1 messages · Page 1 of 1 (latest)
@elder root is this with regards to your earlier question i.e. when using Checkout? or this is for a different scenario?
yes checkout
with payment sheet
I want to auto select last used method for repeated purchases
If you don't set the default payment method for your customer i.e. invoice_settings.default_payment_method [0], the last used method (which is attached to your customer) should be selected by default.
Are you seeing otherwise?
[0] https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
no. i think you misunderstand
In this UI, user have to press "Choose Payment Method" button every time they checkout to choose recent methods.
What i need is app need to select last used / default method without poping up that sheet.
Hello @elder root I believe the button is on your code, correct? And when push onto the button, you are calling presentPaymentSheet to display the PaymentSheet
So to completely avoid that Sheet, you should save the Customer Id (somehow) on your client, and send it to your server
Then in your server, you use that Customer Id, find his PaymentMethod, and use it to charge your customer immediately.
So generally, you would need to modify your UI flow
gotcha! i will combine that two approach. thank for the help
The problem with charge/confirming Payment on server, is that if the card requires 3DS, you will need to pass that information again to client, and in your ReactNative you will need to handle the redirect URL etc
That's why we recommend to use the PaymentSheet, it automatically handle 3DS if any, for you
ah. i forgot 3d problem. ok i will better use sheet with new flow. Thank you