Create an Account Session 

Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.

Parameters

  • accountstringRequired

    The identifier of the account to create an Account Session for.

  • componentsobjectRequired

    Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).

Returns

Returns an Account Session object if the call succeeded.

POST /v1/account_sessions
curl https://api.stripe.com/v1/account_sessions \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d account=acct_1NkDjjJyhOZfPCWt \
-d "components[account_onboarding][enabled]"=true \
-d "components[payments][enabled]"=true \
-d "components[payouts][enabled]"=true \
-d "components[balances][enabled]"=true
Response
{
"object": "account_session",
"account": "acct_1NkDjjJyhOZfPCWt",
"client_secret": "_OXIKXxEihJokDBnDoe2sgG5OGSO2Q12shKvbeboxpALZGng",
"expires_at": 1693261123,
"livemode": false,
"components": {
"account_management": {
"enabled": false,
"features": {
"external_account_collection": true
}
},
"account_onboarding": {
"enabled": true,
"features": {
"external_account_collection": true
}
},
"balances": {
"enabled": true,
"features": {
"edit_payout_schedule": false,
"instant_payouts": false,
"standard_payouts": false,
"external_account_collection": true
}
},
"documents": {
"enabled": false,
"features": {}
},
"notification_banner": {
"enabled": false,
"features": {
"external_account_collection": true
}
},
"payment_details": {
"enabled": false,
"features": {
"capture_payments": true,
"destination_on_behalf_of_charge_management": false,
"dispute_management": true,
"refund_management": true
}
},
"payments": {
"enabled": true,
"features": {
"capture_payments": true,
"destination_on_behalf_of_charge_management": false,
"dispute_management": true,
"refund_management": true
}
},
"payouts": {
"enabled": true,
"features": {
"edit_payout_schedule": false,
"instant_payouts": false,
"standard_payouts": false,
"external_account_collection": true
}
},
"payouts_list": {
"enabled": false,
"features": {}
},
"tax_registrations": {
"enabled": false,
"features": {}
},
"tax_settings": {
"enabled": false,
"features": {}
}
}
}

Application Fees 

When you collect a transaction fee on top of a charge made for your user (using Connect), an Application Fee object is created in your account. You can list, retrieve, and refund application fees.

Related guide: Collecting application fees

Application Fee Refunds 

Application Fee Refund objects allow you to refund an application fee that has previously been created but not yet refunded. Funds will be refunded to the Stripe account from which the fee was originally collected.

Related guide: Refunding application fees

Capabilities 

This is an object representing a capability for a Stripe account.

Related guide: Account capabilities

Country Specs 

Stripe needs to collect certain pieces of information about each account created. These requirements can differ depending on the account’s country. The Country Specs API makes these rules available to your integration.

You can also view the information from this API call as an online guide.