API reference
Account Links
Account Links are the means by which a Connect platform grants a connected account permission to access Stripe-hosted applications, such as Connect Onboarding. Related guide: Connect Onboarding
https://api.knoxapi.comCreate an account link
POST/v1/account_links
Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
Body parameters
accountstringRequiredThe identifier of the account to create an account link for.
typestringRequiredThe type of account link the user is requesting. You can create Account Links of type
account_updateonly for connected accounts where your platform is responsible for collecting requirements, including Custom accounts. You can't create them for accounts that have access to a Stripe-hosted Dashboard. If you use Connect embedded components, you can include components that allow your connected accounts to update their own information. For an account without Stripe-hosted Dashboard access where Stripe is liable for negative balances, you must use embedded components.Possible valuesaccount_onboardingaccount_update
collectstringThe collect parameter is deprecated. Use
collection_optionsinstead.Possible valuescurrently_dueeventually_due
collection_optionsobjectSpecifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow.
Show 2 child parameters
fieldsstringPossible valuescurrently_dueeventually_due
future_requirementsstringPossible valuesincludeomit
expandarray of stringsSpecifies which fields in the response should be expanded.
refresh_urlstringThe URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.
return_urlstringThe URL that the user will be redirected to upon leaving or completing the linked flow.
Returns
The account_link object.
curl https://api.knoxapi.com/v1/account_links \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
-d account=acct_1PgafTB7WZ01zgkW \
-d type=account_onboardingconst Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/account_links', {
account: 'acct_1PgafTB7WZ01zgkW',
type: 'account_onboarding',
});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_links", account="acct_1PgafTB7WZ01zgkW", type="account_onboarding")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/account_links', {
account: 'acct_1PgafTB7WZ01zgkW',
type: 'account_onboarding',
}){
"created": 1234567890,
"expires_at": 1234567890,
"object": "account_link",
"url": "https://sangeekp-15t6ai--manage-mydev.dev.stripe.me/setup/s/acct_1PgafTB7WZ01zgkW/MerI6itPZo2K"
}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.