#inv2004
1 messages · Page 1 of 1 (latest)
What are you trying to accomplish, exactly?
We use the usePaymentSheet but it confuses users that it allows to select one of the available cards and close it. But, looks like, the usePaymentSheet does not provide any information about the card was selected
We are trying to understand:
- if we can find any workaround with the current
usePaymentSheetwhich is about ok, except it confuses users which the "select card" which is really not "select card" - Should we do something else to avoid the problem
What does that have to do with editing? Are you trying to present existing payment methods for selection?
... and to find which method is selected in the dialog
The blue mark makes user thinks that is payment card dialog
Right, so my understanding is that you need to retrieve the payment or setup intent to inspect this
https://stripe.dev/stripe-react-native/api-reference/index.html#retrievePaymentIntent
Documentation for @stripe/stripe-react-native
We have no payment intent at the moment yet
Alternatively, you might want to explore our beta for Customer Sheet: https://stripe.com/docs/elements/customer-sheet?platform=react-native
To save some time: Is it possible to extract current selected card from the usePaymentSheet via webhooks ?
What is the "old" method for editing cards ? Not integrated with final payment and payment intent
You've said "editing" cards again and I don't know what you mean by that.
You can click "add" or "edit" one the current cards in the dialog
After payment, sure, the payment_method would be included on the payment intent events (like payment_intent.succeeded)
Ah, seems like you might already be using customer sheet then?
It looks pretty similar. We use usePaymentSheet
But to highlight - we do not have payment intent at the moment yet
What do you have? Can you share more about your flow and provide an example/sketch of the sequence here?
I can write it here:
- We do not have PI at the moment
- We have booking page with the list of customer's availbale cards
- User can select any card on our own page and we will create PI after it
Another flow:
- For example user have card1
- The page contains "add card" button which creates the dialog I mentioned. And user want to add card2
- He added the card2 in your dialog and it is highligted with the blue mark
- he clicks "set up" to return to the prev screen and necessary to select card one more time, but user thought he did it in prev dialog
our screen:
[Your cards]
[ card1 [x]]
[ card2 [ ]]
["add card"]
[Book hotel]
if he clicks the "add card" the usePaymentSheet appears, he adds card3, selects it, clicks "Ok", but then the card1 is still active on our screen
In the first flow, that sounds like your own UI then to present payment methods? I'm not clear on how that relates to the payment sheet (which only exists for a setup or payment flow)