Platform SDK architecture
Every Platform SDK consists of two layers:
- A core library, which runs the verification session. It talks to the Platform, runs the workflow step by step, and runs the camera steps (document scanning, card scanning, and face capture) with the screens of the scanning SDKs. It has no screens of its own for the other steps; it tells your app which step is next and what it needs, and your app shows it. This is sometimes called "headless" mode.
- A UX library, which adds our screens on top of the core library: the progress overview, forms, document upload, errors, the result, and so on. It's built on the same public API of the core library that you can use yourself.
Both layers start from the same sdkConfiguration, which your backend gets when it creates the transaction.
Neither creates transactions or collects consent.
Which layer to use
Use the UX library if our screens, with the customization they allow, fit your app. That's the quickest integration, and it's what the quick start guides use.
Use the core library alone if you need full control over how the verification looks, for example to match a design system that our customization options can't express. You then build a screen for every step that isn't a camera step, and handle errors and retries yourself.
The camera steps use the screens of the scanning SDKs in both cases.
Per platform
Web
The web SDK is a single package, @microblink/platform-sdk.
It renders our screen for every step by default, and you can replace the screen for any step that isn't a camera step:
- In vanilla JavaScript, register a handler with
sdk.onStep(step, handler). The handler receives the step's state, and the same actions that our screen uses. - In React, check
sdk.currentStepbefore you renderPlatformFlowUI, and render your own UI for that step.
If you replace every step, you've built your own UI on the core. Read Replace screens.
Android
com.microblink:microblink-platform: the UX library. You start it withMicroblinkPlatform.startVerification.com.microblink:microblink-platform-engine: the core library, called the engine. You start a session withEngine.startSession, and advance it one step at a time withsession.next.
The UX library depends on the engine, so add only microblink-platform to use our screens, and only microblink-platform-engine to build your own.
In both cases, also add the scanning SDKs that your workflows need.
Read Add the SDK.
iOS
MicroblinkPlatform: the UX library. You show it withMicroblinkPlatform.view(configuration:onEvent:).MicroblinkPlatformEngine: the core library, called the engine. You start a session withMicroblinkPlatformEngine.startSession, and advance it one step at a time withsession.next.
The configuration and result types come from MicroblinkPlatformEngine, so you import it even if you only use our screens.
In both cases, also add the scanning SDKs that your workflows need.
Read Scanner dependencies.
Customization
With the UX library, you can change colors, fonts, images, button shapes, and text, but not the layout of our screens: