Stripe: Retrieve a customer
Stripe customers.getCustomersCustomer: arguments, response, policy and SDK examples.
← Customers operations · Get started
Operation stripe.getcustomerscustomer
Provider route: GET /v1/customers/{customer}. 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["customers"]["getCustomersCustomer"]>[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.customers.getCustomersCustomer(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.customers.get_customers_customer(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.customer | string | Required within parent | Maximum length: 5000 |
query | object | Optional | Additional keys: not allowed |
query.expand | array | Optional | |
query.expand[] | string | Each item | Maximum length: 5000 |
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 |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | Model | Alternative | Expand Create a customer — response body |
$ (anyOf 2) | Model | Alternative | Expand Delete a customer — response body |
Referenced models: Create a customer — response body, Delete a customer — response body
Schemas
Section titled “Schemas”705 more schemas are linked from the tables above, on the schema pages.
Delete a customer — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
deleted | boolean | Required within parent | Always true for a deleted object Known values: True |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: customer |
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 |
Retrieve a bank account — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | These bank accounts are payment methods on `Customer` objects. On the other hand [External Accounts](/api#external_accounts) are transfer destinations on `Account` objects for connected accounts. They can be bank accounts or debit cards as well, and are documented in the links above. Related guide: [Bank debits and transfers](/payments/bank-debits-transfers) |
account | JSON | Optional | |
account (anyOf 1) | JSON | Alternative | The account this bank account belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an [External Account](/api/external_account_bank_accounts/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`. |
account (anyOf 1) (anyOf 1) | string | Alternative | Maximum length: 5000 |
account (anyOf 1) (anyOf 2) | Model | Alternative | Expand Create an account — response body |
account (anyOf 2) | null | Alternative | |
account_holder_name | JSON | Optional | |
account_holder_name (anyOf 1) | string | Alternative | The name of the person or business that owns the bank account. Maximum length: 5000 |
account_holder_name (anyOf 2) | null | Alternative | |
account_holder_type | JSON | Optional | |
account_holder_type (anyOf 1) | string | Alternative | The type of entity that holds the account. This can be either `individual` or `company`. Maximum length: 5000 |
account_holder_type (anyOf 2) | null | Alternative | |
account_type | JSON | Optional | |
account_type (anyOf 1) | string | Alternative | The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. Maximum length: 5000 |
account_type (anyOf 2) | null | Alternative | |
available_payout_methods | JSON | Optional | |
available_payout_methods (anyOf 1) | array | Alternative | A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. |
available_payout_methods (anyOf 1)[] | string | Each item | Known values: instant, standard |
available_payout_methods (anyOf 2) | null | Alternative | |
bank_name | JSON | Optional | |
bank_name (anyOf 1) | string | Alternative | Name of the bank associated with the routing number (e.g., `WELLS FARGO`). Maximum length: 5000 |
bank_name (anyOf 2) | null | Alternative | |
country | string | Required within parent | Two-letter ISO code representing the country the bank account is located in. Maximum length: 5000 |
currency | string | Required within parent | Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. Format: currency |
customer | JSON | Optional | |
customer (anyOf 1) | JSON | Alternative | The ID of the customer that the bank account is associated with. |
customer (anyOf 1) (anyOf 1) | string | Alternative | Maximum length: 5000 |
customer (anyOf 1) (anyOf 2) | Model | Alternative | Expand Create a customer — response body |
customer (anyOf 1) (anyOf 3) | Model | Alternative | Expand Delete a customer — response body |
customer (anyOf 2) | null | Alternative | |
default_for_currency | JSON | Optional | |
default_for_currency (anyOf 1) | boolean | Alternative | Whether this bank account is the default external account for its currency. |
default_for_currency (anyOf 2) | null | Alternative | |
fingerprint | JSON | Optional | |
fingerprint (anyOf 1) | string | Alternative | Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Maximum length: 5000 |
fingerprint (anyOf 2) | null | Alternative | |
future_requirements | JSON | Optional | |
future_requirements (anyOf 1) | JSON | Alternative | Information about the [upcoming new requirements for the bank account](https://docs.stripe.com/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. |
future_requirements (anyOf 1) (anyOf 1) | Model | Alternative | Expand Retrieve a bank account — response body — requirements value currently due, errors, past due, pending verification |
future_requirements (anyOf 2) | null | Alternative | |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
last4 | string | Required within parent | The last four digits of the bank account number. Maximum length: 5000 |
metadata | JSON | Optional | |
metadata (anyOf 1) | object | Alternative | 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 (anyOf 1).* | string | Additional keys | Maximum length: 500 |
metadata (anyOf 2) | null | Alternative | |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: bank_account |
requirements | JSON | Optional | |
requirements (anyOf 1) | JSON | Alternative | Information about the requirements for the bank account, including what information needs to be collected. |
requirements (anyOf 1) (anyOf 1) | Model | Alternative | Expand Retrieve a bank account — response body — requirements value currently due, errors, past due, pending verification |
requirements (anyOf 2) | null | Alternative | |
routing_number | JSON | Optional | |
routing_number (anyOf 1) | string | Alternative | The routing transit number for the bank account. Maximum length: 5000 |
routing_number (anyOf 2) | null | Alternative | |
status | string | Required within parent | For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, `tokenized_account_number_deactivated` or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If the status is `tokenized_account_number_deactivated`, the account utilizes a tokenized account number which has been deactivated due to expiration or revocation. This account will need to be reverified to continue using it for money movement. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. For external accounts, possible values are `new`, `errored`, `verification_failed`, and `tokenized_account_number_deactivated`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. Maximum length: 5000 |
Referenced models: Create an account — response body, Create a customer — response body, Delete a customer — response body, Retrieve a bank account — response body — requirements value currently due, errors, past due, pending verification
Pay an invoice — response body — custom fields Custom fields displayed on the invoice item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
name | string | Required within parent | The name of the custom field. Maximum length: 5000 |
value | string | Required within parent | The value of the custom field. Maximum length: 5000 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: stripe.getcustomerscustomer. Catalog operation: GetCustomersCustomer. 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"}