Install Bolt Connect SDK
Before you begin, install the SDK using one of the following methods:Using npm
Using yarn
Using pnpm
Using bun
Direct download from npm registry
Alternatively, you can download the package directly from the npm registry: Package info:https://registry.npmjs.org/@boltpay/bolt-connect-sdk
Quick Start
Follow these steps to onboard sellers using the Bolt Connect SDK.Step 1: Import the SDK
Step 2: Configure Onboarding
API Reference
Set up the onboarding configuration with your credentials and event callbacks. Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| clientProps (ClientProps) | Object containing client-specific configuration parameters. | ||
publishableKey | string | ✅ | Your Bolt publishable key. You can find this value in the Merchant Dashboard. |
marketplaceSubMerchantID | string | ✅ | The identifier of the seller in your platform. |
isTestEnv | boolean | ❌ | true for sandbox; false for production (default false). |
| eventHandlers | Object containing optional callback functions. | ||
onSuccess | () => void | ❌ | Triggered when onboarding completes successfully. |
onFailure | (payload: { message: string }) => void | ❌ | Triggered when onboarding fails. |
onNotify | (payload: { message: string }) => void | ❌ | Triggered for status updates during onboarding. |
Step 3: Start Onboarding
API Reference
Starts the onboarding form as a full-age iframe within your site. Example
Step 4: Get Seller Information and Onboarding Status
API Reference
Fetches seller information and current onboarding status. Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| GetSellerInfoParams | Parameters used to retrieve seller information. | ||
publishableKey | string | ✅ | Your Bolt publishable key. You can find this value in the Merchant Dashboard. |
marketplaceSubMerchantID | string | ✅ | The identifier of the seller in your platform. |
isTestEnv | boolean | ❌ | true for sandbox; false for production (default false). |
| Name | Type | Description |
|---|---|---|
| SellerInfoResponse | The response object containing seller information. | |
publishableKey | string | The publishable key of the seller, to be used to initiate checkout. |
onboardingStatus | string | The onboarding status: completed, unconfigured, under_review. |
Caching
The SDK includes intelligent caching to improve performance:- Seller information is cached for improving performance.
Error Handling
The SDK provides comprehensive error handling:Browser Support
The SDK supports all modern browsers with ES6+ support:- Chrome 60+
- Firefox 55+
- Safari 12+
- Edge 79+