How to install Square’s beta SDKs

We recently released a big update to SDKs—here’s how to upgrade.

Tristan Sokol
Square Corner Blog
2 min readMay 2, 2017

--

Heads up, we’ve moved! If you’d like to continue keeping up with the latest technical content from Square please visit us at our new home https://developer.squareup.com/blog

[Update: the beta has completed, download the latest version of our SDKs here] As a reminder, if you want help with installation, to give us feedback on the new design and features, or simply to learn more about the APIs, request an invite to our new Slack community here.

The differences in version 2.1.0 of our new SDKs are the same for each language (of course, these changes look a little different in each language). The main differences are:

  • Support for v1 endpoints including items and inventory management, employee management, and the v1 version of transaction reporting.
  • Renaming and reorganizing of some of the generated APIs:
  • We’ve removed the per request Authorization parameter. With our new design you’ll only need to set your access token once in the beginning, and not in every request. To visualize this difference in php, our current model looks like this:

and with version 2.1.0 and forward, that same request would look like:

Installation Guides

PHP

You can install the beta 2.1.0 version of our SDK with composer with the command line:

or by adding the following to your composer.json file for your project.

You can also install from GitHub with:

and use the familiar require('connect-php-sdk/autoload.php'); within your application.

Java

You’ll need to get the source from GitHub and:

You should now have a new .jar file to include with your project.

Ruby

With Ruby, you can specify the 2.1.0.beta version of the square-connect gem to install by running:

Python

You can install the Python package straight from GitHub with:

C#

You’ll need to download the files from GitHub and switch to the 2.1.0 version:

You can then build the .dll by running./build.sh for Unix-based systems or build.bat for Windows. You will likely need to download the dependencies, but you should be prompted to do so to build.

To learn more about how our SDKs are made, as well as the release of our Java SDK, check out our earlier post announcing new versions of our client SDKs.

--

--

Tristan Sokol
Square Corner Blog

Software Lead at NorthPoint Development. When I’m not helping automate a real estate company, I’m growing succulents in my back yard. https://tristansokol.com/