Web payments SDK - Gift card entry

My application uses the Web Payments SDK to collect card information from customers. When a customer enters a gift card into the card number field, it shows a Square icon indicating that the form recognizes it as a Square gift card. The form still shows fields for collecting an expiration date, CVV, and zip code, which aren’t needed for gift card payments. Is there a way to make the default card form not ask for these additional fields when a gift card is entered?

From the documentation, it looks like I need to set up a separate gift card form specific to gift cards instead of using the card form. I’d prefer not to do it this way, if I can avoid it.

I’ve also noticed that if I enter random numbers for expiration, CVV, and zip code, the form processes gift card payment successfully, it’s just confusing for customers to be asked for these when using a gift card.

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Payment API: Process Online and In-Person Payments
Cards API
Cards API

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

At this time you’ll need to use the gift card form field to accept Square gift card. That won’t prompt the seller to enter CVV and AVS. :slightly_smiling_face:

Got it, thank you. It would be a nice enhancement to the card form if it automatically hid those fields when it recognizes that the user is entering a gift card.