Scell.io Onboarding Web Component
Embed a fully compliant company verification and e-invoicing onboarding flow in your application with just one line of code. SIREN validation, VAT verification, and legal representative confirmation included.
<script src="https://cdn.scell.io/widget/v1/onboarding.js"></script>
<scell-onboarding
publishable-key="pk_test_xxxx"
environment="sandbox"
></scell-onboarding>Quick Start
pk_test_* (from your dashboard) to test the component in sandbox mode. Test data is not persisted.The Scell.io onboarding component handles the entire company verification flow: SIREN/SIRET lookup, VAT number validation, address verification, and legal representative confirmation.
Step 1: Include the script
<script src="https://cdn.scell.io/widget/v1/onboarding.js"></script>Step 2: Add the component
<scell-onboarding
api-key="pk_live_your_api_key"
environment="production"
theme="auto"
locale="fr"
></scell-onboarding>Step 3: Handle events
document.querySelector('scell-onboarding')
.addEventListener('onboarding:completed', (e) => {
console.log('Company verified:', e.detail.company_id);
// Redirect to dashboard or update UI
});Live Demo
This demo uses a test publishable key. Create your account to get your own pk_test_* key and test the widget with your data.
Test the Scell.io Onboarding component directly below. This widget allows your users to verify their company (SIREN, VAT, legal representative) and complete their registration.
This widget runs in sandbox mode. To integrate it, see the Quick Start guide above.
API Reference
Attributes
Configure the component behavior using HTML attributes.
| Attribute | Type | Required | Description |
|---|---|---|---|
publishable-key | string | Yes | Your publishable key (pk_live_xxx or pk_test_xxx) |
environment | "sandbox" | "production" | No | Environment. Default: "sandbox" |
external-id | string | No | Your internal identifier for this sub-tenant (link with your system) |
callback-url | string | No | URL to redirect after onboarding completion |
theme | "light" | "dark" | "auto" | No | Color theme. Default: "light" |
locale | "fr" | "en" | No | Widget language. Default: "fr" |
width | string | No | Widget width. Default: "100%" |
height | string | No | Widget height. Default: "600px" |
Events
Listen to component events to react to user actions and state changes.
| Event | Payload | Description |
|---|---|---|
onboarding:started | { sessionId: string } | Onboarding session has been initialized |
onboarding:step | { step: string, progress: number } | User navigated to a new step (siret, verify, documents, complete) |
onboarding:siret-verified | { companyName: string, siret: string } | SIRET has been successfully verified |
onboarding:documents-uploaded | { count: number } | KYB documents have been uploaded |
onboarding:completed | { authorizationCode: string, externalId?: string } | Onboarding completed — exchange the code via POST /onboarding/exchange |
onboarding:error | { code: string, message: string } | An error occurred during onboarding |
Integration Modes
Choose the integration method that best fits your architecture.
Web Component
Embed directly in your frontend. Best for SPAs and modern web apps.
- Fastest integration
- Full customization
- Real-time events
- Works everywhere
Redirect Flow
Redirect users to Scell.io hosted page. Best for server-rendered apps.
- No frontend code
- Hosted by Scell.io
- OAuth-style flow
- PCI compliant
API Only
Build your own UI. Full control over the verification flow.
- Complete control
- Custom UX
- Backend-first
- White label
API REST Example
// Create onboarding session via APIconst response = await fetch('https://api.scell.io/api/v1/onboarding/sessions', { method: 'POST', headers: { 'X-API-Key': 'sk_live_xxxx', 'Content-Type': 'application/json' }, body: JSON.stringify({ company_id: 'comp_xxxx', redirect_url: 'https://yourapp.com/callback', webhook_url: 'https://yourapp.com/webhooks/scell', metadata: { user_id: 'user_123', plan: 'enterprise' } })});const { session_id, session_url, expires_at } = await response.json();// Redirect user to session_url or embed Web Component with session_idRedirect Flow Example
// 1. Create session on your backendconst session = await scellApi.createOnboardingSession({ company_id: companyId, redirect_url: 'https://yourapp.com/onboarding/callback', success_url: 'https://yourapp.com/dashboard?verified=true', cancel_url: 'https://yourapp.com/dashboard?verified=false'});// 2. Redirect user to Scell.io hosted pagewindow.location.href = session.session_url;// 3. Handle callback on your redirect URL// Query params: ?session_id=xxx&status=completed&signature=xxxFramework Examples
Copy-paste examples for popular frameworks.
import { useEffect, useRef } from 'react';// Declare the custom element typedeclare global { namespace JSX { interface IntrinsicElements { 'scell-onboarding': React.DetailedHTMLProps< React.HTMLAttributes<HTMLElement> & { 'api-key'?: string; 'mode'?: 'sandbox' | 'production'; 'company-id'?: string; 'redirect-url'?: string; 'theme'?: 'light' | 'dark' | 'auto'; 'locale'?: string; }, HTMLElement >; } }}export function ScellOnboarding({ apiKey, companyId, onComplete, onError }) { const ref = useRef<HTMLElement>(null); useEffect(() => { // Load the Web Component script const script = document.createElement('script'); script.src = 'https://cdn.scell.io/widget/v1/onboarding.js'; script.async = true; document.head.appendChild(script); return () => { document.head.removeChild(script); }; }, []); useEffect(() => { const el = ref.current; if (!el) return; const handleComplete = (e: CustomEvent) => onComplete?.(e.detail); const handleError = (e: CustomEvent) => onError?.(e.detail); el.addEventListener('onboarding:completed', handleComplete); el.addEventListener('onboarding:error', handleError); return () => { el.removeEventListener('onboarding:completed', handleComplete); el.removeEventListener('onboarding:error', handleError); }; }, [onComplete, onError]); return ( <scell-onboarding ref={ref} api-key={apiKey} company-id={companyId} environment="production" theme="auto" /> );}Webhooks
Receive real-time notifications when onboarding events occur. Configure your webhook URL in the dashboard.
x-scell-signature header.Example Webhook Payload
// Example webhook payload for onboarding.completed{ "event": "onboarding.completed", "created_at": "2024-01-15T10:30:00Z", "data": { "session_id": "sess_xxxx", "company_id": "comp_xxxx", "status": "verified", "verification": { "siren_verified": true, "vat_verified": true, "address_verified": true, "legal_rep_verified": true }, "company": { "name": "ACME Corporation", "siren": "123456789", "vat_number": "FR12345678901", "address": { "street": "123 Rue de Paris", "city": "Paris", "postal_code": "75001", "country": "FR" } } }, "signature": "sha256=xxxxx"}Available Webhook Events
| Event | Description |
|---|---|
onboarding.started | User started the onboarding flow |
onboarding.step_completed | User completed a verification step |
onboarding.completed | All verification steps completed successfully |
onboarding.failed | Verification failed (invalid data, timeout, etc.) |
onboarding.cancelled | User cancelled the onboarding |
Ready to integrate?
Create your account and get your API keys in minutes. Start with 100 free credits.