App viewport
Beta
Show a view from an installed App.
The App viewport renders a view from an installed App.
For full integration details, see Accounting software integrations.
When creating an Account Session, enable app_viewport by specifying app_viewport
in the components
parameter.
Note
The app_viewport component is in private beta, so the Stripe SDKs don’t include it yet. To enable it when creating an account session, use this code snippet with the Stripe beta SDK:
Stripe.api_key = '{{sk_INSERT_YOUR_SECRET_KEY}}'
Stripe.api_version = '2023-10-16; embedded_connect_beta=v2;'
account_session = Stripe::AccountSession.create({
account: '{{CONNECTED_ACCOUNT_ID}}'
,
components: {
app_viewport: {enabled: true}
}
})
After creating the account session and initializing ConnectJS, you can render the app_viewport component in the front end:
import {useCreateComponent, useAttachAttribute} from '@stripe/react-connect-js';
export const ConnectAppViewportWithAttributes = ({
appId,
appData
}: {
appId: string;
}): JSX.Element | null => {
const {wrapper, component: appViewport} = useCreateComponent(
'stripe-connect-app-viewport' as any
);
useAttachAttribute(appViewport, 'app' as any, appId);
useAttachAttribute(appViewport, 'appData' as any, appData);
return wrapper;
};
This embedded component supports the following parameters:
Setter | Type | Description |
---|
setApp | Sets the ID of the App your connected account can install. See available apps here. | string |
setAppData | Record<String, String> | Sets data pertaining to your platform consumed by the App. |
Request early access Beta
Sign in to request access to this Connect embedded component in beta.
If you don’t have a Stripe account, you can register now.