Creates a Connect instance for use with ConnectComponentsProvider. This instance manages the configuration and state for Connect embedded components.
const connectInstance = loadConnectAndInitialize({ publishableKey: 'pk_test_123', fetchClientSecret: async () => { const response = await fetch('/account_session'); const { client_secret } = await response.json(); return client_secret; }, appearance: { variables: { colorPrimary: '#635BFF' } }}); Copy
const connectInstance = loadConnectAndInitialize({ publishableKey: 'pk_test_123', fetchClientSecret: async () => { const response = await fetch('/account_session'); const { client_secret } = await response.json(); return client_secret; }, appearance: { variables: { colorPrimary: '#635BFF' } }});
Initialization parameters including publishableKey and fetchClientSecret
A StripeConnectInstance that can be passed to ConnectComponentsProvider
Creates a Connect instance for use with ConnectComponentsProvider. This instance manages the configuration and state for Connect embedded components.
Example