PHP SDK

The Square PHP library supports Square APIs in a language-idiomatic way that reduces complexity without sacrificing API functionality.


Latest SDK Version: 41.0.0.20250220

Each SDK version is tied to a specific Square API version. As features are added, Square releases a new Square API version and a new SDK version. To use new features, you must update the SDK version in your application. Review the release notes to learn about changes in each API version.

An increase in the SDK major version number indicates a breaking change. You should always test your application before deploying a change to production.

Important

Version 41.0.0.20250220 of the PHP SDK represents a full rewrite of the SDK, with a number of breaking changes, including client construction and parameter names. When upgrading from version 40.0.0.20250123 or earlier, read the migration guide to learn what to update and how to use the new SDK and the legacy version side by side.

Link to section

Installation

Install the latest version by running the following command:

composer require square/square
Link to section

Quickstart

  • Follow along with the Quickstart guide to set up and test the Square PHP SDK in your own project.