# Manage locations Group and manage your readers by physical location. You can streamline the management of multiple readers across different physical sites by using locations and zones. Locations and zones help by associating each reader with specific operational sites and guarantee that the correct regional configurations are downloaded. - **Locations**: Allows you to group readers, monitor their connectivity status, and modify your settings based on physical location. This functionality is beneficial for marketplaces with multiple connected accounts. - **Zones**: Offers an optional method to further categorize locations and readers. Zones enable you to represent broader groups of readers or locations, such as larger geographic regions (for example, countries) or organizational sub-brands. Multiple locations can belong to a single zone, and you can create a hierarchical structure by grouping multiple zones under a single zone. Zones provide an additional way to group locations. You must still assign readers to a location, and you can assign a location to only one zone. ## Locations You can create a location for each physical place where your readers operate. You can [register](https://docs.stripe.com/terminal/fleet/register-readers.md) multiple readers to each location, and nest these locations within zones. Before you can use a reader, you must register it to a location. The required [address properties](https://docs.stripe.com/api/terminal/locations/create.md#create_terminal_location-address) for a location vary by country: You can use the Dashboard or API to update a `Location` object. After you create a location, you can’t change its country. Instead, create a new location in the new country, and then re-register any readers associated with the old location. ## Zones Zones are the top-level groups that can consist of either more zones or locations. You can add more zones nested under an existing one, creating additional hierarchy levels, such as “West coast.” However, organizing your locations into zones is optional. ## Create locations and zones # Dashboard > This is a Dashboard for when dashboard-or-api is dashboard. View the original doc at https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=dashboard. First, you must [register your reader to a location](https://docs.stripe.com/terminal/fleet/register-readers.md?dashboard-or-api=dashboard) to accept payments. You can manage your locations and zones in the [Manage locations](https://dashboard.stripe.com/terminal/locations) page. To open this page from the Terminal reader page, click the **Manage locations** button on the Readers tab. ### Create a location To create a location: 1. Click the overflow menu (⋯) on the **All locations** row, then click **Create location**. 1. Enter a name and a valid address. Providing an address ensures that the correct configuration and settings are applied based on the region where the readers are operating. 1. Click **Done**. You can also create a specific [configuration](https://docs.stripe.com/terminal/fleet/configurations-overview.md) for that location. ### Create a zone To create a zone: 1. Click the overflow menu (⋯) on the **All locations** row, then click **Create zone**. 1. Enter a name. 1. Click **Done**. ### Create a nested zone To create a nested zone: 1. Click the overflow menu (⋯) on the zone for which you want to create a nested zone, then click **Create zone**. 1. Enter a name. 1. Click **Done**. ### Add or move a location to a zone To add or move a location to a zone: 1. Click the overflow menu (⋯) on the location, then click **Move location**. 1. Choose the zone or nested zone where you want to move the location. 1. Click **Done**. ### Delete a location To delete a location, you must remove the readers associate with it: 1. Remove all readers from the location in which you want to delete. 1. Click the overflow menu (⋯) on the location, then click **Delete location**. 1. Click **Yes, delete location**. ### Delete a zone To delete a zone, you must remove the readers associate with it: 1. Remove all readers from the location you want to delete, and remove all locations under the zones. - (Optional) Move the locations with readers to a different zone. 1. Click the overflow menu (⋯) on the zone, then click **Delete zone**. 1. Click **Yes, delete zone**. # API > This is a API for when dashboard-or-api is api. View the original doc at https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api. You can’t create or modify zones using the API. First, you must [register your reader to a location](https://docs.stripe.com/terminal/fleet/register-readers.md?dashboard-or-api=api) to accept payments. To create a new Terminal [Location](https://docs.stripe.com/api/terminal/locations.md) object using the API, use the [create location](https://docs.stripe.com/api/terminal/locations/create.md) request. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Terminal.LocationCreateOptions { DisplayName = "HQ", Address = new AddressOptions { Line1 = "1272 Valencia Street", City = "San Francisco", State = "CA", Country = "US", PostalCode = "94110", }, }; var service = new Stripe.Terminal.LocationService(); Stripe.Terminal.Location location = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.TerminalLocationParams{ DisplayName: stripe.String("HQ"), Address: &stripe.AddressParams{ Line1: stripe.String("1272 Valencia Street"), City: stripe.String("San Francisco"), State: stripe.String("CA"), Country: stripe.String("US"), PostalCode: stripe.String("94110"), }, }; result, err := location.New(params); ``` ```java Stripe.apiKey = "<>"; LocationCreateParams params = LocationCreateParams.builder() .setDisplayName("HQ") .setAddress( LocationCreateParams.Address.builder() .setLine1("1272 Valencia Street") .setCity("San Francisco") .setState("CA") .setCountry("US") .setPostalCode("94110") .build() ) .build(); Location location = Location.create(params); ``` ```node const stripe = require('stripe')('<>'); const location = await stripe.terminal.locations.create({ display_name: 'HQ', address: { line1: '1272 Valencia Street', city: 'San Francisco', state: 'CA', country: 'US', postal_code: '94110', }, }); ``` ```python import stripe stripe.api_key = "<>" location = stripe.terminal.Location.create( display_name="HQ", address={ "line1": "1272 Valencia Street", "city": "San Francisco", "state": "CA", "country": "US", "postal_code": "94110", }, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $location = $stripe->terminal->locations->create([ 'display_name' => 'HQ', 'address' => [ 'line1' => '1272 Valencia Street', 'city' => 'San Francisco', 'state' => 'CA', 'country' => 'US', 'postal_code' => '94110', ], ]); ``` ```ruby Stripe.api_key = '<>' location = Stripe::Terminal::Location.create({ display_name: 'HQ', address: { line1: '1272 Valencia Street', city: 'San Francisco', state: 'CA', country: 'US', postal_code: '94110', }, }) ``` ### Create a location for accounts using direct charges To create a Location for an account using [direct charges](https://docs.stripe.com/connect/direct-charges.md), use the `Stripe-Account` header in your request. Only the Connect account you authenticate as can access these locations. If the business operates in multiple physical sites, you can create multiple Locations for any individual accounts with direct charges. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Terminal.LocationCreateOptions { DisplayName = "HQ", Address = new AddressOptions { Line1 = "1272 Valencia Street", City = "San Francisco", State = "CA", Country = "US", PostalCode = "94110", }, }; var service = new Stripe.Terminal.LocationService(); Stripe.Terminal.Location location = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.TerminalLocationParams{ DisplayName: stripe.String("HQ"), Address: &stripe.AddressParams{ Line1: stripe.String("1272 Valencia Street"), City: stripe.String("San Francisco"), State: stripe.String("CA"), Country: stripe.String("US"), PostalCode: stripe.String("94110"), }, }; result, err := location.New(params); ``` ```java Stripe.apiKey = "<>"; LocationCreateParams params = LocationCreateParams.builder() .setDisplayName("HQ") .setAddress( LocationCreateParams.Address.builder() .setLine1("1272 Valencia Street") .setCity("San Francisco") .setState("CA") .setCountry("US") .setPostalCode("94110") .build() ) .build(); Location location = Location.create(params); ``` ```node const stripe = require('stripe')('<>'); const location = await stripe.terminal.locations.create({ display_name: 'HQ', address: { line1: '1272 Valencia Street', city: 'San Francisco', state: 'CA', country: 'US', postal_code: '94110', }, }); ``` ```python import stripe stripe.api_key = "<>" location = stripe.terminal.Location.create( display_name="HQ", address={ "line1": "1272 Valencia Street", "city": "San Francisco", "state": "CA", "country": "US", "postal_code": "94110", }, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $location = $stripe->terminal->locations->create([ 'display_name' => 'HQ', 'address' => [ 'line1' => '1272 Valencia Street', 'city' => 'San Francisco', 'state' => 'CA', 'country' => 'US', 'postal_code' => '94110', ], ]); ``` ```ruby Stripe.api_key = '<>' location = Stripe::Terminal::Location.create({ display_name: 'HQ', address: { line1: '1272 Valencia Street', city: 'San Francisco', state: 'CA', country: 'US', postal_code: '94110', }, }) ``` ### Create a location for accounts using destination charges For integrations using [destination charges](https://docs.stripe.com/connect/destination-charges.md), Locations belong to the _platform_ account and aren’t mapped strictly to connected accounts. If your platform needs to associate accounts using destination charges with Locations, you can store a reference to the relevant accounts in the Location’s [metadata](https://docs.stripe.com/api/terminal/locations/object.md#terminal_location_object-metadata) property. ```bash curl https://api.stripe.com/v1/terminal/locations \ -u <>: \ -d "display_name"="{{terminal.sample_location.display_name}}" \ -d "address[line1]"="{{terminal.sample_location.address.line1}}" \ -d "address[city]"="{{terminal.sample_location.address.city}}" \ -d "address[country]"="{{terminal.sample_location.address.country}}" \ -d "address[postal_code]"="{{terminal.sample_location.address.postal_code}}" \ -d "metadata[connected_account]"="<>" ``` ```ruby <> Stripe::Terminal::Location.create({ display_name: '{{terminal.sample_location.display_name}}', address: { line1: '{{terminal.sample_location.address.line1}}', city: '{{terminal.sample_location.address.city}}', country: '{{terminal.sample_location.address.country}}', postal_code: '{{terminal.sample_location.address.postal_code}}', }, metadata: { connected_account: '<>', } }) ``` ```python <> stripe.terminal.Location.create( display_name='{{terminal.sample_location.display_name}}', address={ 'line1': '{{terminal.sample_location.address.line1}}', 'city': '{{terminal.sample_location.address.city}}', 'country': '{{terminal.sample_location.address.country}}', 'postal_code': '{{terminal.sample_location.address.postal_code}}', }, metadata={ 'connected_account': '<>', } ) ``` ```php <> \Stripe\Terminal\Location::create([ 'display_name' => '{{terminal.sample_location.display_name}}', 'address' => [ 'line1' => '{{terminal.sample_location.address.line1}}', 'city' => '{{terminal.sample_location.address.city}}', 'country' => '{{terminal.sample_location.address.country}}', 'postal_code' => '{{terminal.sample_location.address.postal_code}}', ], 'metadata' => [ 'connected_account' => '<>', ] ]) ``` ```java <> LocationCreateParams.Address address = LocationCreateParams.Address.builder() .setLine1("{{terminal.sample_location.address.line1}}") .setCity("{{terminal.sample_location.address.city}}") .setCountry("{{terminal.sample_location.address.country}}") .setPostalCode("{{terminal.sample_location.address.postal_code}}") .build(); LocationCreateParams params = LocationCreateParams.builder() .setDisplayName("{{terminal.sample_location.display_name}}") .setAddress(address) .putMetadata("connected_account", "<>") .build(); Location.create(params); ``` ```javascript <> const location = await stripe.terminal.locations.create({ display_name: '{{terminal.sample_location.display_name}}', address: { line1: '{{terminal.sample_location.address.line1}}', city: '{{terminal.sample_location.address.city}}', country: '{{terminal.sample_location.address.country}}', postal_code: '{{terminal.sample_location.address.postal_code}}', }, metadata: { connected_account: '<>' } }) ``` ```go <> params := &stripe.TerminalLocationParams{ DisplayName: stripe.String("{{terminal.sample_location.display_name}}"), Address: &stripe.AccountAddressParams{ Line1: stripe.String("{{terminal.sample_location.address.line1}}"), City: stripe.String("{{terminal.sample_location.address.city}}"), Country: stripe.String("{{terminal.sample_location.address.country}}"), PostalCode: stripe.String("{{terminal.sample_location.address.postal_code}}"), }, } params.AddMetadata("connected_account", "<>") l, _ := location.New(params) ``` ```csharp <> var options = new LocationCreateOptions { DisplayName = "{{terminal.sample_location.display_name}}", Address = new AddressOptions { Line1 = "{{terminal.sample_location.address.line1}}", City = "{{terminal.sample_location.address.city}}", Country = "{{terminal.sample_location.address.country}}", PostalCode = "{{terminal.sample_location.address.postal_code}}", Metadata = new Dictionary { { "connected_account", "<>" }, } }, }; var service = new LocationService(); service.Create(options); ``` When you [register your reader to a Location](https://docs.stripe.com/terminal/fleet/register-readers.md), the specified Location groups the reader and defines its country settings. ## Scope connection tokens When creating a [ConnectionToken](https://docs.stripe.com/api/terminal/connection_tokens.md) for the Terminal SDK, you can provide a `location` parameter to control access to smart readers. If you provide a Location, the ConnectionToken is only usable with smart readers assigned to that Location. If you don’t provide a Location, the ConnectionToken is usable with all readers. For Bluetooth readers, the `location` of a ConnectionToken has no effect. This ensures that any nearby Bluetooth readers remain discoverable. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Terminal.ConnectionTokenCreateOptions { Location = "<>", }; var service = new Stripe.Terminal.ConnectionTokenService(); Stripe.Terminal.ConnectionToken connectionToken = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.TerminalConnectionTokenParams{Location: stripe.String("<>")}; result, err := connectiontoken.New(params); ``` ```java Stripe.apiKey = "<>"; ConnectionTokenCreateParams params = ConnectionTokenCreateParams.builder().setLocation("<>").build(); ConnectionToken connectionToken = ConnectionToken.create(params); ``` ```node const stripe = require('stripe')('<>'); const connectionToken = await stripe.terminal.connectionTokens.create({ location: '<>', }); ``` ```python import stripe stripe.api_key = "<>" connection_token = stripe.terminal.ConnectionToken.create(location="<>") ``` ```php $stripe = new \Stripe\StripeClient('<>'); $connectionToken = $stripe->terminal->connectionTokens->create([ 'location' => '<>', ]); ``` ```ruby Stripe.api_key = '<>' connection_token = Stripe::Terminal::ConnectionToken.create({location: '<>'}) ```