After reading this:
Stripe Custom Checkout With Options
I understand that it is not possible to get the details from what is typed-in in the Stripe iframe.
What about the response's details? For example, when I click to pay with an expired test card, I can observe this in the console (Network tab):
error {
code: 'expired_card'
doc_url: 'https://stripe.com/docs/error-codes/expired-card'
message: 'Your card has expired.'
param: 'exp_month'
type: 'card_error'
}
My goal is to get that message and display it in my own popup (since Stripe only does this for a few types of errors).
I tried some Stripe error tags already (docs) in the page where I load their payment form, but they seem to not get updated with any content...
Is there any other way to catch these responses details? Or do I need something else for these to show up?
Note: I am not performing the requests myself - I need to use the default checkout form loaded by Stripe (similar to the "Pay by Card" button in this quickstart while using these Stripe test cards).