App install renders a component that enables your connected account to install an app. App install is a private preview component that requires using preview versions of Stripe SDKs. Read more about private preview components.
When creating an Account Session, enable the App install component by specifying app_install in the components parameter. You must enable the app you want to install by specifying the features parameter under allowed_apps.
// index.html<div id="app-install-container"></div>// index.js// Do something when install state fetched on renderconsthandleAppInstallFetched=(response)=>{
console.log(`Install state fetched for app ${response.appId} to ${response.state}`);};// Do something when install state changesconsthandleAppInstallChanged=(response)=>{
console.log(`Install state changed for app ${response.appId} to ${response.state}`);};const container = document.getElementById('app-install-container');const appInstall = stripeConnectInstance.create('app-install');
appInstall.setApp('{{APP_ID}}');
appInstall.setOnAppInstallStateFetched(handleAppInstallFetched);
appInstall.setOnAppInstallStateChanged(handleAppInstallChanged);
container.appendChild(appInstall);
Method
Description
Variables
setOnAppInstallStateFetched
Allows users to specify custom behavior in a callback function on install fetch.
response.appId: The app installed
response.state: The state of the install INSTALLED | UNINSTALLED
setOnAppInstallStateChanged
Allows users to specify custom behavior in a callback function when the install state has changed.
response.appId: The app installed
response.state: The state of the install INSTALLED | UNINSTALLED
You can integrate our sample app (set APP_ID to stripe.app-explorer), which we’ve pre-approved for embedding on your platform.
Request early access Private preview
Sign in to request access to this Connect embedded component in preview.
If you don’t have a Stripe account, you can register now.