# Mobile Payments SDK - Card holder's name blank

**URL:** <https://developer.squareup.com/forums/t/mobile-payments-sdk-card-holders-name-blank/22347>\
**Category:** Questions\
**Tags:** mobile-payments-sdk\
**Created:** [May 17, 2025, 12:32am UTC](https://developer.squareup.com/forums/t/mobile-payments-sdk-card-holders-name-blank/22347 "2025-05-17T00:32:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mauliks](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@Mauliks](https://developer.squareup.com/forums/u/Mauliks)\
**Post date:** [May 17, 2025, 12:32am UTC](https://developer.squareup.com/forums/t/mobile-payments-sdk-card-holders-name-blank/22347/1 "2025-05-17T00:32:09Z")

</div>

Hello,

After successful payment, I am trying to get details of the card like the card’s last 4 digits, brand and name. I can get the last 4 digits and brand but the name is always blank. I tried tap to pay and also manual card entry for the payment.

```auto
NSDictionary<NSString *, id> *paymentDict = onlinePayment.dictionaryRepresentation;
id <SQMPCard> card = onlinePayment.cardDetails.card;

NSString * cardNum = card.last4;
NSString * cardType = paymentDict[@"cardDetails"][@"card"][@"cardBrand"];
NSString * cardName = [card cardholderName];

```

Am I missing anything here?

---

<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:** [May 17, 2025, 12:32am UTC](https://developer.squareup.com/forums/t/mobile-payments-sdk-card-holders-name-blank/22347/2 "2025-05-17T00:32:22Z")

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

> **[Take a Credit Card Payment](https://developer.squareup.com/docs/reader-sdk/quick-start/step-5)**
>
> Connect a Square Reader and complete a credit card transaction.

> **[Supported Payment Methods by Country](https://developer.squareup.com/docs/payment-card-support-by-country)**
>
> Learn about Square support for payment card brands by country for card-not-present and card-present payments.

> **Additional Documentation**
>
> [Build on iOS: In-App Payments SDK](https://developer.squareup.com/docs/in-app-payments-sdk/build-on-ios)  
> [Gift Card Payments](https://developer.squareup.com/docs/in-app-payments-sdk/cookbook/giftcards)  
> [Payment API: Process Online and In-Person Payments](https://developer.squareup.com/docs/payments)

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:** ![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:** [May 19, 2025, 3:40pm UTC](https://developer.squareup.com/forums/t/mobile-payments-sdk-card-holders-name-blank/22347/3 "2025-05-19T15:40:16Z")

</div>

Card holder name will only be present if it was provided when calling `CreatePayment`. If you need the card holders name you’ll need to take the `customer_id` and call [RetrieveCustomer](https://developer.squareup.com/reference/square/customers-api/retrieve-customer) to get the name of the customer. 🙂

---

<div class="post-metadata">

**Author:** ![Mauliks](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@Mauliks](https://developer.squareup.com/forums/u/Mauliks)\
**Post date:** [May 19, 2025, 4:19pm UTC](https://developer.squareup.com/forums/t/mobile-payments-sdk-card-holders-name-blank/22347/4 "2025-05-19T16:19:39Z")

</div>

So there is no way to get the name from the SDK by  
`id <SQMPCard> card = onlinePayment.cardDetails.card;` ?

I am not using other APIs in the app and only using SDK.

---

<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:** [May 19, 2025, 4:24pm UTC](https://developer.squareup.com/forums/t/mobile-payments-sdk-card-holders-name-blank/22347/5 "2025-05-19T16:24:39Z")

</div>

Right, there isn’t any other way to get the customers name with the SDK. You have to call the Customers API to get those details. 🙂

---

<div class="post-metadata">

**Author:** ![Mauliks](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@Mauliks](https://developer.squareup.com/forums/u/Mauliks)\
**Post date:** [May 19, 2025, 7:33pm UTC](https://developer.squareup.com/forums/t/mobile-payments-sdk-card-holders-name-blank/22347/6 "2025-05-19T19:33:50Z")

</div>

Sorry, but I don’t understand this.

We are not creating customers in Square but just taking payments via Readers like POS. So do we need to implement create customer and then create payment n all? Can you please provide more details?

---

<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:** [May 19, 2025, 8:21pm UTC](https://developer.squareup.com/forums/t/mobile-payments-sdk-card-holders-name-blank/22347/7 "2025-05-19T20:21:57Z")

</div>

When a payment is created without an explicit customer assignment, Square attempts to infer the associated customer. First, Square checks the `customer_id` field in the corresponding order. If this field isn’t set, Square searches the Customer Directory for a matching profile using payment or related information (such as the billing and shipping address, email address, and payment source). If one cannot be found, Square attempts to create an instant profile. Note that this process is asynchronous and might take some time before `customer_id` is added to the payment.

If Square cannot find a matching customer profile and cannot create an instant profile, the `customer_id` field of the payment remains unset.

You can have your app collect the customer information and create a customer profile so you’ll have the information. Otherwise some payments may not have a `customer_id`. 🙂

---

<div class="post-metadata">

**Author:** ![Mauliks](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@Mauliks](https://developer.squareup.com/forums/u/Mauliks)\
**Post date:** [May 19, 2025, 9:38pm UTC](https://developer.squareup.com/forums/t/mobile-payments-sdk-card-holders-name-blank/22347/8 "2025-05-19T21:38:10Z")

</div>

Thanks for the explanation.

However, taking the user’s details before payment is not what we want in our app because it will queue up the people and take more time for the whole process.

We just wanted to take payments from readers for a purpose. So I think the last 4 digits are fine to have than the card holder’s name.

---

<div class="post-metadata">

**Author:** ![Mauliks](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@Mauliks](https://developer.squareup.com/forums/u/Mauliks)\
**Post date:** [May 19, 2025, 10:08pm UTC](https://developer.squareup.com/forums/t/mobile-payments-sdk-card-holders-name-blank/22347/9 "2025-05-19T22:08:40Z")

</div>

One more thing about the Requirements and limitations for SDK doc says:

- You’ve set your Xcode iOS deployment target to iOS 16+.

But my project has iOS 14 deployment target and it’s still working fine. I am able to compile and take payments on production. So what’s the point of iOS deployment target to iOS 16? Will it affect if I have iOS 14?

---

<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:** [May 20, 2025, 12:03am UTC](https://developer.squareup.com/forums/t/mobile-payments-sdk-card-holders-name-blank/22347/10 "2025-05-20T00:03:57Z")

</div>

If it’s working on iOS 14 great! However the stable supported target is iOS 16+. 🙂
