I have a new subscription plan for customers to purchase through our mobile app which uses the Square API. In Square web interface, I can see the subscription and the associated paid invoice. I can retrieve the subscription via the API and see the customer ID, let’s say it’s “xyz”. However, if I use the search subscriptions endpoint, using “xyz” as the customer ID search parameter, nothing shows up. Also, it seems this person’s customer account was created via a “merge”, not sure if that is relevant or not. This happened around 1PM central time.
Merges can happen. When duplicate customer profiles are identified and merged, either manually by the seller or using automated detection, the existing profiles are merged into a single profile that is assigned a new ID.
If you specify the ID of a customer profile that was deleted in a merge operation, the Customers API returns the new customer profile. For example, suppose customers A and B are merged and a new customer C is created. If you call RetrieveCustomer using the ID of customer A or B, the Customers API returns customer C.
You’ll want to either keep track of merge events with the customer.updated webhook or call RetrieveCustomer to make sure you have the latest right customer_id.
@Bryan-Square - Maybe to ask an initial question - under what conditions do profiles merge? As I’m doing more looking, I found another instance of two profiles merging, and somehow during the merge the reference_id attribute was lost. So I want to understand the exact circumstances under which two profiles will merge.
What’s the customer_id of the merged profile. We shouldn’t be removing any reference_ids. The information in the customer profile should remain unchanged and alway’s accessible to you!
@Bryan-Square I have another example where the subscriptions API is not working as expected. If I retrieve the subscription ID b0351d4d-9687-41df-9120-ba2296b68ae2 I see that the customer ID is V3KGWA98QD9JFJ8NP02QDCZMYC. However, if I search subscriptions using a customer ID filter of V3KGWA98QD9JFJ8NP02QDCZMYC, I get no results. Why is this the case?
Also, using their post-merge ID of 2JH4FA6P1S3W334DGT412TMGE0 still yields no results.
Hey @crocboy I’m looking through the history of this and it looks like this should have been resolved. Are you still running into issues searching for subscriptions for 2JH4FA6P1S3W334DGT412TMGE0, or is it occurring for other customer IDs?