Backend Verification & Webhooks
To guarantee security and prevent client-side response tampering, your backend server should always perform server-to-server verification or listen for webhooks before granting user access or updating account states.
1. Backend Session Lookup API
When the client-side SDK finishes a verification flow, it returns a session_id. Send this session_id to your backend server, where your server can query Prembly's backend API securely using your Secret Key.
Endpoint Specification
GET /api/v1/checker-widget/sdk/sessions/{session_id}/ HTTP/1.1
Host: api.prembly.com
x-api-key: your_secret_api_key
x-organisation-id: your_org_id
Content-Type: application/jsonRequest Headers
| Header | Description | Required |
|---|---|---|
x-api-key | Your Secret API Key (found in Integrations & API in the dashboard). | Yes |
x-organisation-id | Your Prembly Organisation ID. | Yes |
Response Example
{
"status": true,
"detail": "Session fetched successfully",
"response": {
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"verification_status": "VERIFIED",
"user_ref": "usr_9921",
"confidence_score": 0.98,
"created_at": "2026-10-06T10:00:00Z",
"metadata": {
"internal_user_id": "usr_9921",
"plan": "premium"
}
}
}metadata is the object you passed when starting the verification, returned as sent — with one exception: if you prefilled a BVN or NIN and it was used, the ID number is removed from metadata and does not appear here or in webhooks. An ID that was ignored stays in metadata as sent. Keys set on the widget in the dashboard are not included.
2. Webhooks
When a user finishes an SDK session, Prembly sends an SDK session completed webhook to your organisation's webhook URL.
The Webhooks guide covers everything you need:
- Setting up your endpoint
- The SDK session payload, field by field
- Checking the
X-Prembly-Signatureheader, with examples in Node.js, Python, PHP and Go - Retries, duplicates and resending undelivered sessions
Confirm before you grant access
Treat the webhook as a signal that a session finished. Before you grant access or change a user's status, call the session lookup API above with your secret key and act on its response.
Ionic (Capacitor) SDK
Integrate Prembly's identity verification widget and compliance workflows into Ionic and Capacitor apps on iOS and Android.
Webhooks
Receive results on your server as soon as a verification, workflow run, transaction screening or credit decision finishes. Set up an endpoint and see what a delivery looks like.