Step 1: Download Composer and dependencies This application requires the PHP Square SDK as well as DotEnv for reading environment variables, which you install via Composer. First, download Composer in this directory with the instructions on this page . After you've downloaded Composer, install the dependencies with the following command from this directory: php composer.phar install Step 2: Get your credentials and set the redirect URL: Open the Developer Dashboard . Choose Open on the card for an application. At the top of the page, set the dashboard mode to Sandbox . Choose OAuth in the left navigation pane. The OAuth page is shown. In the Sandbox Redirect URL box, enter the URL for the callback you will implement to complete the OAuth flow: http://localhost:8000/sandbox_callback.php This example uses localhost in the Square Sandbox. You can use HTTP for localhost but an actual web server implementation must use HTTPS....