#lschirfteachable_35505

1 messages · Page 1 of 1 (latest)

agile sedgeBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

rancid geode
stiff prairie
#

oh i see-- how does this api interface with the react stripe api?

would we set the callback on the result of this call? elements.getElement('payment')

rancid geode
#

I'm not sure I understand the question. You configure an event listener the same way you would with any non-Stripe Element for the most part

stiff prairie
#

if we've initialised the PaymentElement using the react lib, how do we then grab the element object to attach the listener to? through the useElements() hook?

rancid geode
#

If you're using something like let paymentElement = elements.getElement('payment'), then you could just add something like this right below it:

paymentElement.on('change', (event) => { //do a thing };

stiff prairie
#

got it-- that was my inarticulate original question 🙂 thank you!