#anshulfarkya_86718
1 messages · Page 1 of 1 (latest)
How?
for example, https://stripe.com/docs/api/charges/object#charge_object-payment_method_details has all the details of what payment method was used for a particular payment.
We want to identify this within the cards element, Will it be the same?
no, it wouldn't. But why would you want to detect this from the frontend with Elements? If you're plugging the information into an async analytics function, that seems to make more sense as something you do from the backend when handling the webhook events or listing payments from the backend API.
We want to identify two things:
- Which option the customer has selected from the available ones in the cards element?
- After successful payment, as a response which of the payment option was used?
- when handling the webhook from the successful payment in your backend you can inspect the Charge object involved and look at the field I mentioned above https://stripe.com/docs/api/charges/object#charge_object-payment_method_details , that would be the best way