Stripe: Create a Location
Stripe terminal.postTerminalLocations: arguments, response, policy and SDK examples.
← Terminal operations · Get started
Operation stripe.postterminallocations
Provider route: POST /v1/terminal/locations. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["terminal"]["postTerminalLocations"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.terminal.postTerminalLocations(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_stripe import StripeIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.terminal.post_terminal_locations(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
headers | object | Optional | Additional keys: not allowed |
headers.Idempotency-Key | string | Optional | Minimum length: 1 Maximum length: 255 |
body | object | Optional | Additional keys: not allowed |
body.address | object | Optional | The full address of the location. |
body.address.city | string | Optional | Maximum length: 5000 |
body.address.country | string | Required within parent | Maximum length: 5000 |
body.address.line1 | string | Optional | Maximum length: 5000 |
body.address.line2 | string | Optional | Maximum length: 5000 |
body.address.postal_code | string | Optional | Maximum length: 5000 |
body.address.state | string | Optional | Maximum length: 5000 |
body.address_kana | object | Optional | The Kana variation of the full address of the location (Japan only). |
body.address_kana.city | string | Optional | Maximum length: 5000 |
body.address_kana.country | string | Optional | Maximum length: 5000 |
body.address_kana.line1 | string | Optional | Maximum length: 5000 |
body.address_kana.line2 | string | Optional | Maximum length: 5000 |
body.address_kana.postal_code | string | Optional | Maximum length: 5000 |
body.address_kana.state | string | Optional | Maximum length: 5000 |
body.address_kana.town | string | Optional | Maximum length: 5000 |
body.address_kanji | object | Optional | The Kanji variation of the full address of the location (Japan only). |
body.address_kanji.city | string | Optional | Maximum length: 5000 |
body.address_kanji.country | string | Optional | Maximum length: 5000 |
body.address_kanji.line1 | string | Optional | Maximum length: 5000 |
body.address_kanji.line2 | string | Optional | Maximum length: 5000 |
body.address_kanji.postal_code | string | Optional | Maximum length: 5000 |
body.address_kanji.state | string | Optional | Maximum length: 5000 |
body.address_kanji.town | string | Optional | Maximum length: 5000 |
body.configuration_overrides | string | Optional | The ID of a configuration that will be used to customize all readers in this location. Maximum length: 500 |
body.display_name | string | Optional | A name for the location. Maximum length is 1000 characters. Maximum length: 1000 |
body.display_name_kana | string | Optional | The Kana variation of the name for the location (Japan only). Maximum length is 1000 characters. Maximum length: 1000 |
body.display_name_kanji | string | Optional | The Kanji variation of the name for the location (Japan only). Maximum length is 1000 characters. Maximum length: 1000 |
body.expand | array | Optional | Specifies which fields in the response should be expanded. |
body.expand[] | string | Each item | Maximum length: 5000 |
body.metadata | JSON | Optional | Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. |
body.metadata (anyOf 1) | object | Alternative | Additional keys: see wildcard field |
body.metadata (anyOf 1).* | string | Additional keys | |
body.metadata (anyOf 2) | string | Alternative | One of: |
body.phone | string | Optional | The phone number for the location. |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Create a Location — response body |
Referenced models: Create a Location — response body
Schemas
Section titled “Schemas”Create a Location — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A Location represents a grouping of readers. Related guide: [Fleet management](https://docs.stripe.com/terminal/fleet/locations) |
address | Model | Required within parent | Expand Create a Location — response body — address |
address_kana | Model | Optional | Expand Create a Location — response body — address kana |
address_kanji | Model | Optional | Expand Create a Location — response body — address kana |
configuration_overrides | string | Optional | The ID of a configuration that will be used to customize all readers in this location. Maximum length: 5000 |
display_name | string | Required within parent | The display name of the location. Maximum length: 5000 |
display_name_kana | string | Optional | The Kana variation of the display name of the location. Maximum length: 5000 |
display_name_kanji | string | Optional | The Kanji variation of the display name of the location. Maximum length: 5000 |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
livemode | boolean | Required within parent | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
metadata | object | Required within parent | Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Additional keys: see wildcard field |
metadata.* | string | Additional keys | Maximum length: 500 |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: terminal.location |
phone | string | Optional | The phone number of the location. Maximum length: 5000 |
Referenced models: Create a Location — response body — address, Create a Location — response body — address kana
Create a Location — response body — address
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
city | JSON | Optional | |
city (anyOf 1) | string | Alternative | City, district, suburb, town, or village. Maximum length: 5000 |
city (anyOf 2) | null | Alternative | |
country | JSON | Optional | |
country (anyOf 1) | string | Alternative | Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Maximum length: 5000 |
country (anyOf 2) | null | Alternative | |
line1 | JSON | Optional | |
line1 (anyOf 1) | string | Alternative | Address line 1, such as the street, PO Box, or company name. Maximum length: 5000 |
line1 (anyOf 2) | null | Alternative | |
line2 | JSON | Optional | |
line2 (anyOf 1) | string | Alternative | Address line 2, such as the apartment, suite, unit, or building. Maximum length: 5000 |
line2 (anyOf 2) | null | Alternative | |
postal_code | JSON | Optional | |
postal_code (anyOf 1) | string | Alternative | ZIP or postal code. Maximum length: 5000 |
postal_code (anyOf 2) | null | Alternative | |
state | JSON | Optional | |
state (anyOf 1) | string | Alternative | State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). Maximum length: 5000 |
state (anyOf 2) | null | Alternative |
Create a Location — response body — address kana
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
city | JSON | Optional | |
city (anyOf 1) | string | Alternative | City/Ward. Maximum length: 5000 |
city (anyOf 2) | null | Alternative | |
country | JSON | Optional | |
country (anyOf 1) | string | Alternative | Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Maximum length: 5000 |
country (anyOf 2) | null | Alternative | |
line1 | JSON | Optional | |
line1 (anyOf 1) | string | Alternative | Block/Building number. Maximum length: 5000 |
line1 (anyOf 2) | null | Alternative | |
line2 | JSON | Optional | |
line2 (anyOf 1) | string | Alternative | Building details. Maximum length: 5000 |
line2 (anyOf 2) | null | Alternative | |
postal_code | JSON | Optional | |
postal_code (anyOf 1) | string | Alternative | ZIP or postal code. Maximum length: 5000 |
postal_code (anyOf 2) | null | Alternative | |
state | JSON | Optional | |
state (anyOf 1) | string | Alternative | Prefecture. Maximum length: 5000 |
state (anyOf 2) | null | Alternative | |
town | JSON | Optional | |
town (anyOf 1) | string | Alternative | Town/cho-me. Maximum length: 5000 |
town (anyOf 2) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: stripe.postterminallocations. Catalog operation: PostTerminalLocations. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Pinned headers: {"Stripe-Version": "2026-09-30.endive"}