Getting card data with new Web Payments API?


I’m currently migrating our current Square implementation for web from SqPaymentForm to the new Web Payments API but I’m unable to figure out how to get the user’s card data, specifically their postal code.

With the old implementation, I was able to able to easily read the cardData object from the cardNonceResponseReceived callback. Does the new API have an equivalent I could grab this data from? I’ve followed the example from the docs and able to received the token no problem.

I tried reading it from the input inside of the iframe but quickly learned that that’s a no go :sweat_smile:

:wave: With the Web Payments SDK there are callbacks for events that will return the postal code. :slightly_smiling_face:

Whoops! Thank you very much :slight_smile: