API reference
Test mode. Use your secret key on your server; live processing is currently disabled.
https://api.knoxapi.comSend form-encoded requests with Authorization: Bearer sk_test_....
Complete OpenAPI specification · Integration guide
Operations and schemas are based on the pinned Stripe OpenAPI specification (MIT). Nested object definitions and enums are available in the complete specification.
POST /v1/account_sessions
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.
Request parameters
| Field | Type | Description |
|---|---|---|
account required | string | The identifier of the account to create an Account Session for. |
components required | object | 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). |
expand | array of string | Specifies which fields in the response should be expanded. |
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
account required | string | The ID of the account the AccountSession was created for |
client_secret required | string | The client secret of this AccountSession. Used on the client to set up secure access to the given `account`. The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs to [setup Connect embedded components](https://docs.stripe.com/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled. |
components required | connect_embedded_account_session_create_components | |
expires_at required | integer | The timestamp at which this AccountSession will expire. |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |