Flutter
Add
kravata_sdk_plugin and open KravataWebView.React Native
Add
kravata-sdk-plugin and render KravataWidgetComponent.How the SDK connects to the Stack API
An SDK integration has three parts. The first one runs in your app; the other two run in your backend against the Stack API.1
Open the widget from your app
Your app asks your backend for a widget session (
sharedKey, nonce, clientId) and opens the widget with your own ID for the user as userId. See Flutter or React Native.2
Receive the terms acceptance webhook
When the user accepts the Terms and Conditions in the widget, Kravata sends the
user.accepted_terms event to your backend. Your userId comes back in that event. See Backend integration.3
Register the user with their KYC data
Your backend calls User Registration with the user’s data and the same ID you passed as
userId. Kravata runs the KYC review and notifies you with user.updated. See Backend integration.The ID you pass to the SDK as
userId is the thread that ties everything together. Use a stable ID from your system (a UUID v4 is recommended) and send the same value when you register the user. Kravata stores it in the user’s metadata as EXTERNAL_USER_ID.Environments
The SDK picks the Kravata environment from theenvironment parameter. Your backend calls the Stack API host of the same environment.
Credentials
Kravata gives you an independent set of credentials for each environment. Test and production credentials are different: never use production credentials while developing.
To get your credentials or the SDK repository access, contact your Kravata point of contact and say which environment you need.

