Skip to content

Stripe: Create a Session — link Account Sessions post Link Account Sessions

Stripe linkAccountSessions.postLinkAccountSessions: arguments, response, policy and SDK examples.

← Link account sessions operations · Get started

Operation stripe.postlinkaccountsessions

Provider route: POST /v1/link_account_sessions. Alter supplies the connection’s credentials and routing.

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["linkAccountSessions"]["postLinkAccountSessions"]>[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.linkAccountSessions.postLinkAccountSessions(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from 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.link_account_sessions.post_link_account_sessions(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
headersobjectOptionalAdditional keys: not allowed
headers.Idempotency-KeystringOptionalMinimum length: 1
Maximum length: 255
bodyModelRequired within parentExpand Create a Session — link Account Sessions post Link Account Sessions — request body — body

Referenced models: Create a Session — link Account Sessions post Link Account Sessions — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Create a Session — link Account Sessions post Link Account Sessions — response body

Referenced models: Create a Session — link Account Sessions post Link Account Sessions — response body

722 more schemas are linked from the tables above, on the schema pages.

Create a Session — link Account Sessions post Link Account Sessions — response body
FieldTypePresenceDescription and constraints
$objectRootA Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts.
account_holderJSONOptional
account_holder (anyOf 1)JSONAlternativeThe account holder for whom accounts are collected in this session.
account_holder (anyOf 1) (anyOf 1)ModelAlternativeExpand Create a Session — linkAccountSessions.postLinkAccountSessions — response body — account_holder / value / type: account, customer
account_holder (anyOf 2)nullAlternative
accountsobjectRequired within parentThe accounts that were collected as part of this Session.
accounts.dataarrayRequired within parentDetails about each object.
accounts.data[]ModelEach itemExpand Subscribe to data refreshes for an Account — response body
accounts.has_morebooleanRequired within parentTrue if this list has another page of items after this one that can be fetched.
accounts.objectstringRequired within parentString representing the object's type. Objects of the same type share the same value. Always has the value `list`.
Known values: list
accounts.urlstringRequired within parentThe URL where this list can be accessed.
Maximum length: 5000
Pattern: ^/v1/financial_connections/accounts
bank_account_tokenModelOptionalExpand Retrieve a token — response body
client_secretJSONOptional
client_secret (anyOf 1)stringAlternativeA value that will be passed to the client to launch the authentication flow.
Maximum length: 5000
client_secret (anyOf 2)nullAlternative
filtersModelOptionalExpand Create a Session — link Account Sessions post Link Account Sessions — response body — filters
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
limitsModelOptionalExpand Create a Session — link Account Sessions post Link Account Sessions — response body — limits
livemodebooleanRequired within parentIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
manual_entryModelOptionalExpand Create a Session — link Account Sessions post Link Account Sessions — response body — manual entry
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: financial_connections.session
permissionsarrayRequired within parentPermissions requested for accounts collected during this session.
permissions[]stringEach itemKnown values: balances, ownership, payment_method, transactions
prefetchJSONOptional
prefetch (anyOf 1)arrayAlternativeData features requested to be retrieved upon account creation.
prefetch (anyOf 1)[]stringEach itemKnown values: balances, ownership, transactions
prefetch (anyOf 2)nullAlternative
return_urlstringOptionalFor webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
Maximum length: 5000

Referenced models: Create a Session — linkAccountSessions.postLinkAccountSessions — response body — account_holder / value / type: account, customer, Create a Session — link Account Sessions post Link Account Sessions — response body — filters, Create a Session — link Account Sessions post Link Account Sessions — response body — limits, Create a Session — link Account Sessions post Link Account Sessions — response body — manual entry, Subscribe to data refreshes for an Account — response body, Retrieve a token — response body

Create a Session — link Account Sessions post Link Account Sessions — request body — body
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
account_holderobjectRequired within parentThe account holder to link accounts for.
account_holder.accountstringOptionalMaximum length: 5000
account_holder.customerstringOptionalMaximum length: 5000
account_holder.customer_accountstringOptionalMaximum length: 5000
account_holder.typestringRequired within parentOne of: account, customer
expandarrayOptionalSpecifies which fields in the response should be expanded.
expand[]stringEach itemMaximum length: 5000
filtersobjectOptionalFilters to restrict the kinds of accounts to collect.
filters.account_subcategoriesarrayOptional
filters.account_subcategories[]stringEach itemOne of: checking, credit_card, line_of_credit, mortgage, savings
filters.countrystringOptionalMaximum length: 5000
filters.require_payment_method_supportstringOptionalOne of: all, at_least_one, none
limitsobjectOptionalSettings for configuring Session-specific limits.
limits.accountsJSONRequired within parent
limits.accounts (anyOf 1)integerAlternative
limits.accounts (anyOf 2)stringAlternativeOne of:
manual_entryobjectOptionalCustomize manual entry behavior
manual_entry.modestringOptionalOne of: automatic, disabled
permissionsarrayRequired within parentList of data features that you would like to request access to.

Possible values are `balances`, `transactions`, `ownership`, and `payment_method`.
permissions[]stringEach itemOne of: balances, ownership, payment_method, transactions
Maximum length: 5000
prefetcharrayOptionalList of data features that you would like to retrieve upon account creation.
prefetch[]stringEach itemOne of: balances, ownership, transactions
return_urlstringOptionalFor webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
Maximum length: 5000
Create a Session — linkAccountSessions.postLinkAccountSessions — response body — account_holder / value / type: account, customer
FieldTypePresenceDescription and constraints
$objectRoot
accountJSONOptionalThe ID of the Stripe account that this account belongs to. Only available when `account_holder.type` is `account`.
account (anyOf 1)stringAlternativeMaximum length: 5000
account (anyOf 2)ModelAlternativeExpand Create an account — response body
customerJSONOptionalThe ID for an Account representing a customer that this account belongs to. Only available when `account_holder.type` is `customer`.
customer (anyOf 1)stringAlternativeMaximum length: 5000
customer (anyOf 2)ModelAlternativeExpand Create a customer — response body
customer_accountstringOptionalMaximum length: 5000
typestringRequired within parentType of account holder that this account belongs to.
Known values: account, customer

Referenced models: Create an account — response body, Create a customer — response body

Create a Session — link Account Sessions post Link Account Sessions — response body — filters
FieldTypePresenceDescription and constraints
$objectRoot
account_subcategoriesJSONOptional
account_subcategories (anyOf 1)arrayAlternativeRestricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`.
account_subcategories (anyOf 1)[]stringEach itemKnown values: checking, credit_card, line_of_credit, mortgage, savings
account_subcategories (anyOf 2)nullAlternative
countryJSONOptional
country (anyOf 1)stringAlternativeCountry from which to filter accounts.
Maximum length: 5000
country (anyOf 2)nullAlternative
require_payment_method_supportstringOptionalWhether the Session should require that linked accounts support payments and retrieve account numbers before completion.
Known values: all, at_least_one, none
Create a Session — link Account Sessions post Link Account Sessions — response body — limits
FieldTypePresenceDescription and constraints
$objectRoot
accountsJSONRequired within parent
accounts (anyOf 1)integerAlternativeThe number of accounts that can be linked in this Session.
accounts (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
Create a Session — link Account Sessions post Link Account Sessions — response body — manual entry
FieldTypePresenceDescription and constraints
$objectRoot
modestringOptionalControls how manual entry of bank account details is presented to the user.
Known values: automatic, disabled

SDK function policy ID: stripe.postlinkaccountsessions. Catalog operation: PostLinkAccountSessions. 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"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.