Automatic assignment of customer based on credit card?

Hi,

I have an app right now that creates Square orders via the API. When I create the order, I do not specify any customer. At most, I fill in recipient info.

However, in some cases, I noticed that Square is automatically linking the order to a Square customer. In some cases, the automatically linking is actually linking to a user we don’t want the transaction linked to.

So I have few questions:

  1. If you don’t explicitly specify a customer, does Square automatically link orders created via the API to a user based on something like the Credit Card info?
  2. If yes, what credit card info is this based on?
  3. I noticed that some credit cards have “Name” and some don’t. When I test my form, we don’t ask for name, but does Square dynamically ask for “Name” in some cases and in others not?

Any insight as to why the linking is happening would be greatly appreciated. Thanks!

: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

Integrate Customer Profiles with Other Services
Payment API: Process Online and In-Person Payments
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.

  1. Yes, if you don’t explicitly specify a customer when creating an order, Square attempts to find the best matching customer profile or create an instant profile to associate with the payment. This process is asynchronous and might take some time before the 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.

  2. The automatic linking is based on the information collected from the customer. If your application doesn’t collect any information from the customer, Square uses its own inference to find the best matching customer profile.

  3. The “Name” field on a credit card is not always required. The requirement for this information can vary based on the specific requirements of the credit card network or the issuing bank. Square does not dynamically ask for “Name” in some cases and not in others. It’s more likely that the name was provided in some cases and not in others, depending on the customer’s input or the requirements of the card network or issuing bank.

This answer was reviewed by @Bryan-Square.