What is Snap4ID embedding?
Documents @snap4id-sdk/app-embed 1.0.0 · @snap4id-sdk/embed-protocol 1.0.0 · @snap4id-sdk/partner-api 1.0.0 · @snap4id-sdk/purchase-verifier 1.0.0 · protocol 1.0
Snap4ID turns a selfie into a compliant ID or passport photo (Polish documents first: pl locale, PLN prices). With
embedding, the whole Snap4ID flow runs inside your app: your app shows the Snap4ID page in a WebView, the user
pays you through the App Store or Google Play, and the finished files come back to your app.
How it works
Section titled “How it works”Three parts work together: a WebView in your app shows the Snap4ID page, a small bridge carries messages between the page and your app, and your app runs the store purchase when the page asks for one. The purchase is then checked by a server, never by the app, and the job is unlocked.
flowchart LR
subgraph phone[User's phone]
subgraph app[Your app]
H[Host code]
W[WebView: Snap4ID page]
H <-->|bridge messages| W
end
end
S[(App Store / Google Play)]
SV[Snap4ID]
V{{Purchase check:<br/>Snap4ID or you}}
W <-->|HTTPS| SV
H <-->|purchase + receipt| S
H -.->|receipt| V
V -->|unlock the job| SV
- Capture. Your app opens
https://snap4.id/embed/{partnerId}. The page takes or picks a photo and processes it. - Pay. The page asks your app to sell the photo. Your app runs the store purchase, bound to the page’s payment reference.
- Unlock. A server checks the store receipt and unlocks the job: Snap4ID checks it, or you do (on our verifier server or in your own backend).
- Deliver. The page sends the files to your app, which copies them. Your backend can also get a signed webhook. See receiving the files.
“Host code” is either our React Native component, which does all of the above for you, or your own code in any native app (iOS, Android, Flutter) speaking the bridge protocol. See choose your setup.
Who does what
Section titled “Who does what”| Part | Does |
|---|---|
| Your app | Opens the page full screen, answers the bridge, runs the store purchase, keeps the files |
| Snap4ID page | The user interface: capture, preview, order button, done screen. Has no chrome of its own |
| Snap4ID | Processes the photo, holds the job for 30 days, signs the file links |
| Store | Charges the user. You are the merchant of record: the store pays you; refunds and terms are yours |
| Purchase check | Snap4ID (with your store details), or you: our verifier server, or your own backend through the Partner API |
Packages
Section titled “Packages”| Package | Runs in | For |
|---|---|---|
@snap4id-sdk/app-embed |
React Native / Expo app | <Snap4IdFlow>: WebView, bridge, store, recovery, delivery |
@snap4id-sdk/embed-protocol |
anywhere | the bridge contract: types, JSON Schemas, the transport shim |
@snap4id-sdk/partner-api |
your Node backend | signed Partner API client, job.paid webhook verifier |
@snap4id-sdk/purchase-verifier |
your Node backend | App Store / Google Play receipt verification, a ready-made verifier server |
All SDK source code (packages, examples and these docs) is in the public GitHub repository lradomski10m/snap4id-sdk.
New to the words used here? See the glossary. Using a coding agent? Point it at
/llms.txt and the agent context.
