# Web Payments SDK and cardholder name

**URL:** <https://developer.squareup.com/forums/t/web-payments-sdk-and-cardholder-name/19356>\
**Category:** Questions\
**Tags:** payment-form, web-payments-sdk, subscriptions-api, payments-api\
**Created:** [October 28, 2024, 5:48pm UTC](https://developer.squareup.com/forums/t/web-payments-sdk-and-cardholder-name/19356 "2024-10-28T17:48:40Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![pascalf1324](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@pascalf1324](https://developer.squareup.com/forums/u/pascalf1324)\
**Post date:** [October 28, 2024, 5:48pm UTC](https://developer.squareup.com/forums/t/web-payments-sdk-and-cardholder-name/19356/1 "2024-10-28T17:48:40Z")

</div>

Hello,

I have a question regarding credit card payment with the Web Payments SDK ([Web Payments SDK](https://developer.squareup.com/docs/web-payments/overview)).

I see that there is no cardholder name requested during the purchase, only card number, exp. date, CVV and postal code(zipcode)

Is it optional to have the cardholder name??

Because if it is not mandatory, then I will not ask for it or implement it?

Because I also see that there is a check that can be done in Javascript a **verifyBuyer** function!

Is this step strongly suggested? Note that I have customers in Canada, USA, France and other countries.

Thank you very much!  
Pascal

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [October 28, 2024, 5:48pm UTC](https://developer.squareup.com/forums/t/web-payments-sdk-and-cardholder-name/19356/2 "2024-10-28T17:48:58Z")

</div>

👋 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:

> **[Web Payments SDK Requirements](https://developer.squareup.com/docs/app-marketplace/requirements/web-payments-sdk)**
>
> Learn about the Square App Marketplaces requirements related to the Web Payments SDK.

> **[Payment API: Process Online and In-Person Payments](https://developer.squareup.com/docs/payments)**
>
> Process online, in-app, and in-person payments with Square payment APIs. Manage disputes and subscriptions and perform other payment-related tasks.

> **Additional Documentation**
>
> [Take Payments Online](https://developer.squareup.com/docs/online-payment-options)  
> [Collecting Information](https://developer.squareup.com/docs/build-basics/collecting-information)  
> [Cards on File Requirements](https://developer.squareup.com/docs/app-marketplace/requirements/cards-on-file)

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.

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [October 28, 2024, 5:49pm UTC](https://developer.squareup.com/forums/t/web-payments-sdk-and-cardholder-name/19356/3 "2024-10-28T17:49:55Z")

</div>

The cardholder name is not a required field when processing payments with Square’s Web Payments SDK. The essential details needed are the card number, expiration date, CVV, and postal code.

As for the `verifyBuyer` function, it is used to handle Strong Customer Authentication (SCA), which is a requirement for certain types of card payments in the European Economic Area (EEA). If a significant portion of your customers are from the EEA, it’s recommended to implement this function. However, even outside of the EEA, using `verifyBuyer` can add an extra layer of security to your payment process, as it helps to verify the identity of the buyer, reducing the risk of fraudulent transactions.

_This answer was reviewed by @Bryan-Square._

---

<div class="post-metadata">

**Author:** ![pascalf1324](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@pascalf1324](https://developer.squareup.com/forums/u/pascalf1324)\
**Post date:** [October 30, 2024, 12:48pm UTC](https://developer.squareup.com/forums/t/web-payments-sdk-and-cardholder-name/19356/4 "2024-10-30T12:48:28Z")

</div>

Hello @Bryan-Square ,

Thanks for reviewing Square-Dev-AI’s answer. I have two more questions about this to see if I understand correctly.

1- if I read the documentation regarding verifyBuyer correctly, I must, on my side, create the form that asks for first name, last name, address, email, country, phone number, region, city?  
and then add the informations in :

```auto
async function verifyBuyer(payments, token) {
        const verificationDetails = {
          amount: '1.00',
          billingContact: {
            addressLines: ['123 Main Street', 'Apartment 1'],
            familyName: 'Doe',
            givenName: 'John',
            email: 'jondoe@gmail.com',
            country: 'GB',
            phone: '3214563987',
            region: 'LND',
            city: 'London',
          },
          currencyCode: 'GBP',
          intent: 'CHARGE',
        };

```

Is that right?

2- If I activate verifyBuyer() for all users (all around the world)… Will a member from the USA or Canada for example have to enter the OTP? or it will not be asked because the user is not part of EEA ?

Thank you very much!  
Have a nice day!

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [October 30, 2024, 6:16pm UTC](https://developer.squareup.com/forums/t/web-payments-sdk-and-cardholder-name/19356/5 "2024-10-30T18:16:51Z")

</div>

Yes, you will need to collect the relevant customer information on your form to pass to `verifyBuyer`. If you add this for all your customers then they be able to set risk rules in our Risk Manager. Based on the rules set will determine whether or not a customer is challenged. 🙂

---

<div class="post-metadata">

**Author:** ![pascalf1324](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@pascalf1324](https://developer.squareup.com/forums/u/pascalf1324)\
**Post date:** [October 31, 2024, 12:22pm UTC](https://developer.squareup.com/forums/t/web-payments-sdk-and-cardholder-name/19356/6 "2024-10-31T12:22:20Z")

</div>

Hello @Bryan-Square ,

Thanks for your response !  
I have another question regarding this topics and the Web Payment SDK. I’m going to ask the question here in this topic because it concerns the javascript code and the backend…

If I change the value of ‘intent’ in JavaScript from ‘CHARGE\_AND\_STORE’ to ‘CHARGE’ the payment not successfull with this error : The verification token provided is invalid.

Response of ERROR

```auto
array (size=1)
  0 => 
    object(Square\Models\Error)[75]
      private 'category' => string 'INVALID_REQUEST_ERROR' (length=21)
      private 'code' => string 'BAD_REQUEST' (length=11)
      private 'detail' => string 'The verification token provided is invalid.' (length=43)
      private 'field' => string 'verification_token' (length=18)

```

My code :

```auto
    const verificationDetails = {
          amount: '32.00',
          billingContact: {
            addressLines: ['123 Main Street', 'Apartment 1'],
            familyName: 'Doe',
            givenName: 'John',
            email: 'jondoe@gmail.com',
            country: 'GB',
            phone: '3214563987',
            region: 'LND',
            city: 'London',
          },
          currencyCode: 'CAD',
          intent: 'CHARGE', //intent: 'CHARGE_AND_STORE',
        };

```

Note that I use this form to create recurring subscriptions for my members.

Also, I do not want to keep the credit card information (card number, expiration date and CVV)

So that’s why I wanted to change the value of ‘intent’ from ‘CHARGE\_AND\_STORE’ to ‘CHARGE’

Because I saw a warning message that mentions this :

> **Important**  
> Always ask customers for permission before saving their card information. For example, include a checkbox in your purchase flow that customers can select to specify that they want to save their card information for future purchases.
> 
> Linking cards on file without obtaining customer permission can result in your application being disabled without notice.

**URL of this important message** : [https://developer.squareup.com/docs/cards-api/overview](https://developer.squareup.com/docs/cards-api/overview)

So, I want to respect all the guidelines!

Is it OK to leave the value of ‘intent’ to ‘CHARGE\_AND\_STORE’ even if I don’t keep credit card information?? Or do I have to modify my code in my backend?

Thank you and have a great day!  
Pascal

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [October 31, 2024, 2:21pm UTC](https://developer.squareup.com/forums/t/web-payments-sdk-and-cardholder-name/19356/7 "2024-10-31T14:21:39Z")

</div>

You won’t be keeping the card information. All that information is stored within Square which is PCI compliant. When saving a card on file we ask that you have the customer opt in when storing the card. If your going to do recurring payments you’ll want to use `CHARGE_AND_STORE`. 🙂

---

<div class="post-metadata">

**Author:** ![pascalf1324](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@pascalf1324](https://developer.squareup.com/forums/u/pascalf1324)\
**Post date:** [October 31, 2024, 3:08pm UTC](https://developer.squareup.com/forums/t/web-payments-sdk-and-cardholder-name/19356/8 "2024-10-31T15:08:53Z")

</div>

Hello @Bryan-Square

Thanks for the explanation.  
The only point I don’t understand is that in my case, it’s always subscriptions. I only sell subscription for every month (or every 3 months, or other 6 months)  
so… it’s always monthly subscriptions… so the user knows in advance that it’s recurring every month, should I still offer him ?  
Because if the user unchecks the checkbox that gives his consent, then what do I do?

if i understand correctly i can’t sell subscription if the user unchecks the checkbox…? or maybe there is something i don’t understand…

Thanks for your explanation

Pascal

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [October 31, 2024, 4:39pm UTC](https://developer.squareup.com/forums/t/web-payments-sdk-and-cardholder-name/19356/9 "2024-10-31T16:39:50Z")

</div>

While the documentation says you need a checkbox you can also just put a note that states something like: “By submitting payment you agree to {{COMPANY\_NAME}} storing the card on file for future payments.” 🙂

---

<div class="post-metadata">

**Author:** ![pascalf1324](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@pascalf1324](https://developer.squareup.com/forums/u/pascalf1324)\
**Post date:** [October 31, 2024, 4:53pm UTC](https://developer.squareup.com/forums/t/web-payments-sdk-and-cardholder-name/19356/10 "2024-10-31T16:53:54Z")

</div>

Hi @Bryan-Square,

Great and thank you so much!

Last question just to be sure… For future charges (other months like 2nd, 3rd, and other depending on the period chosen) on the credit card, is this managed automatically by SquareUp? I have nothing else to do ?

Thank you again for your very valuable help, it is always very very appreciated!

Have a nice day!

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [October 31, 2024, 5:05pm UTC](https://developer.squareup.com/forums/t/web-payments-sdk-and-cardholder-name/19356/11 "2024-10-31T17:05:48Z")

</div>

Your using the Subscriptions API right? If so then we will handle the billing according to the subscription. 🙂

---

<div class="post-metadata">

**Author:** ![pascalf1324](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@pascalf1324](https://developer.squareup.com/forums/u/pascalf1324)\
**Post date:** [October 31, 2024, 5:56pm UTC](https://developer.squareup.com/forums/t/web-payments-sdk-and-cardholder-name/19356/12 "2024-10-31T17:56:08Z")

</div>

Thanks so much @Bryan-Square  
Yes i’m using subscription :

`$body = new \Square\Models\CreateSubscriptionRequest($locationId, $sandboxToken);`

Thanks so much !  
Have a great day !
