To setup squareup payment gateway first you have to create a developer account from here https://developer.squareup.com/apps .
step 01: create app
add account name and select your country then click create
Step 02: click on your open button
Step 03: get your api credentials for your website, you will see different option to set for production and sandbox, use which one you want. sandbox is for test payment and production is for live payment
Step 04: now you need location Id as well, click on locations in bottom left corner
your squareup payment gateway setting is done, now add all those info in your website admin panel “General settings > payment Gateway settings”