API reference
Account Sessions
An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components. We recommend that you create an AccountSession each time you need to display an embedded component to your user. Do not save AccountSessions to your database as they expire relatively quickly, and cannot be used more than once. Related guide: Connect embedded components
https://api.knoxapi.comCreate an Account Session
POST/v1/account_sessions
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.
Body parameters
accountstringRequiredThe identifier of the account to create an Account Session for.
componentsobjectRequiredEach 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).
Show 22 child parameters
account_managementobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobjectChild parameters are listed in the OpenAPI document.
account_onboardingobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobjectChild parameters are listed in the OpenAPI document.
balance_reportobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobject
balancesobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobjectChild parameters are listed in the OpenAPI document.
disputes_listobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobjectChild parameters are listed in the OpenAPI document.
documentsobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobject
financial_accountobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobjectChild parameters are listed in the OpenAPI document.
financial_account_transactionsobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobjectChild parameters are listed in the OpenAPI document.
instant_payouts_promotionobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobjectChild parameters are listed in the OpenAPI document.
issuing_cardobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobjectChild parameters are listed in the OpenAPI document.
issuing_cards_listobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobjectChild parameters are listed in the OpenAPI document.
notification_bannerobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobjectChild parameters are listed in the OpenAPI document.
payment_detailsobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobjectChild parameters are listed in the OpenAPI document.
payment_disputesobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobjectChild parameters are listed in the OpenAPI document.
payment_method_settingsobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobjectChild parameters are listed in the OpenAPI document.
paymentsobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobjectChild parameters are listed in the OpenAPI document.
payout_detailsobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobject
payout_reconciliation_reportobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobject
payoutsobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobjectChild parameters are listed in the OpenAPI document.
payouts_listobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobject
tax_registrationsobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobject
tax_settingsobjectShow 2 child parameters
enabledbooleanRequiredfeaturesobject
expandarray of stringsSpecifies which fields in the response should be expanded.
Returns
The account_session object.
curl https://api.knoxapi.com/v1/account_sessions \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
-d account=acct_1Pgc7HKmsySxIypT \
-d components=const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/account_sessions', {
account: 'acct_1Pgc7HKmsySxIypT',
components: {},
});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/account_sessions", account="acct_1Pgc7HKmsySxIypT", components={})require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/account_sessions', {
account: 'acct_1Pgc7HKmsySxIypT',
components: {},
}){
"account": "acct_1Pgc7HKmsySxIypT",
"client_secret": "accs_secret__QXhWgWIhGJ2Zl68tEmbZ29Gtc86adyWl6eEz2h6K7HtpnoB",
"components": {
"account_management": {
"enabled": false,
"features": {
"external_account_collection": true,
"disable_stripe_user_authentication": true
}
},
"account_onboarding": {
"enabled": false,
"features": {
"external_account_collection": true,
"disable_stripe_user_authentication": true
}
},
"balances": {
"enabled": false,
"features": {
"edit_payout_schedule": false,
"external_account_collection": true,
"standard_payouts": false,
"disable_stripe_user_authentication": true,
"instant_payouts": true
}
},
"documents": {
"enabled": false,
"features": {}
},
"notification_banner": {
"enabled": false,
"features": {
"external_account_collection": true,
"disable_stripe_user_authentication": true
}
},
"payment_details": {
"enabled": false,
"features": {
"capture_payments": true,
"destination_on_behalf_of_charge_management": false,
"dispute_management": true,
"refund_management": true,
"smart_disputes_management": true
}
},
"payments": {
"enabled": false,
"features": {
"capture_payments": true,
"destination_on_behalf_of_charge_management": false,
"dispute_management": true,
"refund_management": true,
"smart_disputes_management": true
}
},
"payouts": {
"enabled": false,
"features": {
"edit_payout_schedule": false,
"external_account_collection": true,
"standard_payouts": false,
"disable_stripe_user_authentication": true,
"instant_payouts": true
}
},
"payouts_list": {
"enabled": false,
"features": {}
},
"tax_registrations": {
"enabled": false,
"features": {}
},
"tax_settings": {
"enabled": false,
"features": {}
},
"financial_account": {
"enabled": true,
"features": {
"disable_stripe_user_authentication": true,
"external_account_collection": true,
"send_money": true,
"transfer_balance": true
}
},
"financial_account_transactions": {
"enabled": true,
"features": {
"card_spend_dispute_management": true
}
},
"issuing_card": {
"enabled": true,
"features": {
"card_management": true,
"card_spend_dispute_management": true,
"cardholder_management": true,
"spend_control_management": true
}
},
"issuing_cards_list": {
"enabled": true,
"features": {
"card_management": true,
"card_spend_dispute_management": true,
"cardholder_management": true,
"disable_stripe_user_authentication": true,
"spend_control_management": true
}
},
"disputes_list": {
"enabled": true,
"features": {
"capture_payments": true,
"destination_on_behalf_of_charge_management": true,
"dispute_management": true,
"refund_management": true,
"smart_disputes_management": true
}
},
"payment_disputes": {
"enabled": true,
"features": {
"destination_on_behalf_of_charge_management": true,
"dispute_management": true,
"refund_management": true,
"smart_disputes_management": true
}
},
"instant_payouts_promotion": {
"enabled": true,
"features": {
"disable_stripe_user_authentication": true,
"external_account_collection": true,
"instant_payouts": true
}
},
"payout_details": {
"enabled": true,
"features": {}
},
"balance_report": {
"enabled": true,
"features": {}
},
"payout_reconciliation_report": {
"enabled": true,
"features": {}
},
"payment_method_settings": {
"enabled": true,
"features": {
"disable_stripe_user_authentication": true
}
}
},
"expires_at": 1234567890,
"livemode": false,
"object": "account_session"
}Operations and schemas come from the pinned Stripe OpenAPI specification (MIT); response examples from its fixtures. Nested object definitions and enums are in the complete specification.