# createLoyaltyAccount confusion

**URL:** <https://developer.squareup.com/forums/t/createloyaltyaccount-confusion/7791>\
**Category:** Questions\
**Tags:** loyalty-api\
**Created:** [December 1, 2022, 4:14pm UTC](https://developer.squareup.com/forums/t/createloyaltyaccount-confusion/7791 "2022-12-01T16:14:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwest](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/cwest/32/1589_2.png) [@cwest](https://developer.squareup.com/forums/u/cwest)\
**Post date:** [December 1, 2022, 4:14pm UTC](https://developer.squareup.com/forums/t/createloyaltyaccount-confusion/7791/1 "2022-12-01T16:14:44Z")

</div>

I’m a little confused by the createLoyaltyAccount endpoint and the adjustLoyaltyPoints endpoint.

**createLoyaltyAccount**  
This endpoint allows me to put in programId & customerId, which I would assume is all that is necessary. However, it also asks for mapping.phoneNumber. It seems to disregard the customerId in the call and searches for any customer accounts that match the mapping.phoneNumber. If none exist it creates a new customer and applies the points to this newly created customer.

I can’t make the call without mapping.phoneNumber which seems to be the culprit. Any ideas?

---

<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:** [December 1, 2022, 6:29pm UTC](https://developer.squareup.com/forums/t/createloyaltyaccount-confusion/7791/2 "2022-12-01T18:29:05Z")

</div>

With the Loyalty API the `mapping.phoneNumber` is required for creating a loyalty account. This is because a customer can use a different phone number for the loyalty account then the one in the customer profile. 🙂

---

<div class="post-metadata">

**Author:** ![cwest](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/cwest/32/1589_2.png) [@cwest](https://developer.squareup.com/forums/u/cwest)\
**Post date:** [December 1, 2022, 7:31pm UTC](https://developer.squareup.com/forums/t/createloyaltyaccount-confusion/7791/3 "2022-12-01T19:31:56Z")

</div>

@Bryan-Square thanks for the response. According to the docs it seems that it only works with phone numbers, not email addresses at the moment. Is there any plan to change that in the future?

---

<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:** [December 1, 2022, 8:13pm UTC](https://developer.squareup.com/forums/t/createloyaltyaccount-confusion/7791/4 "2022-12-01T20:13:59Z")

</div>

Yes, that’s correct. At this time only a phone number is supported. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. 🙂
