#aseychell - elements

1 messages ยท Page 1 of 1 (latest)

plucky linden
#

hello, what do you mean by validating the expiry in this case? Do you want to check the expiry to ensure it is later than the reservation date?

twilit parrot
#

yes exactly

plucky linden
twilit parrot
#

can this be done on the client side before completing the setup intent?

plucky linden
#

Are you using the card element or the payment element?

twilit parrot
#

we're using the card element through ngx-stripe. In the docs, i found this reference but not sure how it can be done

plucky linden
twilit parrot
#

Thanks for your suggestion. I just tried the on change listener but the expiry date is not available, only the postal code.

plucky linden
#

No, it's not in the change event. You listen for the change event, and when complete=true you would use createPaymentMethod to get a payment method object you can inspect.

twilit parrot
#

ok I will try and let you know, thanks a lot

#

seems I can work with this. the completeSetupIntent still works even though we call createPaymentMethod before. Thanks a lot for you help ๐Ÿ™‚