You can’t have a business if you don’t have any customers, but importing customers from an existing system can be a pain, and sometimes you need to be able to do so programmatically. In PHP, our PHP SDK makes it fairly easy to create these customers using one simple script:
The code starts out by loading the PHP SDK that was installed with Composer and then setting the access token for the account. Then you can create a new instance of the
CustomersApi and a new object that will hold all of the customer information that you are trying to upload. Finally, you call the
createCustomer() method with your customer object and voilà, you have a brand new customer in your account.
I hope you liked this post, let me know what you’d like the next one to be about by reaching out to @SquareDev on twitter.