#jm-wallets
1 messages · Page 1 of 1 (latest)
Hi 👋 if a customer pays with a wallet then the resulting Payment Method will have information in the card.wallet hash that you can reference:
https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-wallet
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
For analytics purpose, I want to track (in the frontend) when the user selects the Apple, Google or input card options
Gotcha, so it sounds like you're looking for the .on('change') event for the Payment Element, more specifically the value field that it provides. Let me see if I can confirm whether this is also available in our React wrapper:
https://stripe.com/docs/js/element/events/on_change?type=paymentElement
I'm seeing that listed here as the onChange prop:
https://stripe.com/docs/stripe-js/react#element-components
Awesome
Can you please confirm if that event also has the required information, if the change is for google/apple and not only "card"
Yes, just ran a quick text and this is what I saw when clicking on Google Pay:
collapsed: false
complete: true
elementType: "payment"
empty: true
value: {type: 'google_pay'}
Any time!