@flonkid/kyc 1.9.2 → 1.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -58,8 +58,9 @@ import { FlonkKYCWidget } from '@flonkid/kyc';
58
58
  ```tsx
59
59
  import { FlonkKYCWidget } from '@flonkid/kyc';
60
60
 
61
- // 1. Create session on your backend first
62
- const { sessionId, embedToken } = await fetch('/api/kyc/create-session', {
61
+ // 1. Create session on your backend first (it returns { sessionId, embedToken,
62
+ // qrCodeUrl } map the API's `id` to `sessionId`)
63
+ const { sessionId, embedToken, qrCodeUrl } = await fetch('/api/kyc/create-session', {
63
64
  method: 'POST',
64
65
  body: JSON.stringify({ email: user.email }),
65
66
  }).then(r => r.json());
@@ -69,6 +70,7 @@ const { sessionId, embedToken } = await fetch('/api/kyc/create-session', {
69
70
  publishableKey="pk_live_..." // optional — instant branded loader (see note)
70
71
  sessionId={sessionId}
71
72
  embedToken={embedToken}
73
+ qrCodeUrl={qrCodeUrl} // needed for the desktop→mobile QR
72
74
  lang="de"
73
75
  onSuccess={(result) => console.log('Verified:', result)}
74
76
  onError={(error) => console.error(error)}