Skip to main content
Drop Dojah’s hosted verification flow into a React app with the dojah-kyc-sdk-react component. You design the flow once in EasyOnboard, then render it by passing your keys and widget type.
Which SDK? This is the widget SDK — it renders Dojah’s UI. To call endpoints directly from your server, use an API client instead. Not sure? See Choosing an SDK.

Requirements

  • React 19 or later (declared as a peer dependency).
  • An App ID and public key from your dashboard.
  • A published widget (EasyOnboard flow) whose widget_id you’ll pass in.

Install

Add the package with npm or yarn:
Terminal

Initialize

Import the component and render it with your credentials and a response handler. Passing all of userData auto-skips the user-data screen.
App.jsx

Props

Handling the response

The response callback fires with a type string as the user moves through the flow:
Don’t trust the client for the final decision. A success event means the flow completed — not that the user passed. Confirm the outcome from your backend using the reference_id (via Get verification or a webhook) before granting access.

Theming & branding

Colors, logo, and which steps appear are configured on the flow itself in EasyOnboard, not in code — the component just renders the published widget_id. To restyle the flow, edit it in the dashboard and republish; no app changes needed.
Note. Switch appID and publicKey to your live keys before shipping to production — sandbox keys won’t bill or return real data.

Resources