Learn how the Square API model works with address information.
Build Basics

Working with Addresses

The address format used by Square is based on an open-source library from Google. For more information, see AddressValidationMetadata.

Addresses are stored using the free-form data entry fields address_line_1 and address_line_2 so that people can represent their addresses in any way they need. Other address components, such as postal_code, locality (city), and administrative_district_level_1 (state, prefecture, or province) are broken out into their own fields because software sometimes behaves differently based on them. For example, sales tax software might charge different amounts of sales tax based on the postal code and some software is only available in certain states due to compliance reasons.

Most addresses contain each of these fields, but their meanings differ based on the locality. The following table shows details about what each address field represents for each country in which Square operates:

Address fieldUnited StatesCanadaAustraliaUnited KingdomIrelandFranceSpain
address_line_1Address line 1Address line 1Address line 1Address line 1Address line 1Address line 1Address line 1
address_line_2Address line 2Address line 2Address line 2Address line 2Address line 2Address line 2Address line 2
postal_codeZIP codePostal codePostal codePostal codeEircodePostcodePostal code

Square products (such as Square Point of Sale and the Seller Dashboard) mostly use a seller's language preference for communication. However, when it comes to addresses, the language preference is overridden: Square products use English for a US address, French for an address in France, and so on.

Some Square APIs, such as Locations and Customers, use addresses in their data models. These addresses look slightly different depending on the country in which the address is located. The following are example addresses for each country in which Square operates.

If you need more assistance, contact Developer Support or ask for help in the Developer Forums.