I’m working on a customer creation form for Square that will create a customer and then immediately retrieve their ID to use further down in the program. However, I can’t figure out how to filter the data returned by using the list_customers command using the API.
I found this post: How to retrieve customer id from create customer method in Square using Python that is asking the same thing but from four years ago, and I don’t understand the answer they received. They say “so first you should do that : result = result.body then to get the ID: result[‘customer’][‘id’]” but I don’t know how to implement that into my code.
Sam Hoops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.