Merging customer: what's the process?

Merge customers: is there an API event that we can subscribe to so that if Square or the merchant automatically merges the customers, we get notified? Or do we keep referencing the old customer ID we created for it and it will show as the merged customer?

Here’s what I was thinking for the user:
Option 1:

  1. user creates an account in the app
  2. we check if a square customer with this email or phone number exists with the list customer API
  3. if it exists: we store that customer ID, if it does not then we create a new customer ID for this user

Option 2:

  1. user creates an account in the app
  2. when the person pays, we create a new customer ID
  3. we keep referencing the newly created customer ID (which could be a duplicate customer) and Square will know where to locate it on the merged customer ID

Hey! :wave: Yes, the customer.created and customer.deleted webhook events will both fire notifications for a merge (for creation of the new profile and for each merged profile, respectively). You can read more in this section of our docs: Notifications for customer profile merge events

I would recommend going with Option 1, although you could use SearchCustomers instead to query for existing customers by email or phone number.