# xiomid. > xiomid is a verification platform: identity verification (KYC), AML screening and ongoing monitoring in one flow. Applicants photograph their ID and take a short liveness selfie on their phone; documents from 200+ countries are read and checked (MRZ check digits, barcodes, expiry, tamper and duplicate checks), the face is matched, names are screened against sanctions, PEP and adverse media lists, and a decision (approved, review or rejected) arrives in about a minute, by webhook. Key facts: - Pricing: one price per action, the same on every plan: full verification $0.30, reused verification $0.10, selfie re-check $0.05, AML screening $0.10, proof of address $0.15, phone verification $0.06, assisted video call $1.50. Plans only add monthly credit (no rollover): Free $0 with $25 of credit a month, Pro $99 a month with $150 of credit, Business $299 a month with $400 of credit; Enterprise by contract and invoice. Every feature on every plan, no minimums. Beyond the monthly credit, usage is paid from a wallet whose credit never expires. - Launch offer: a $499 code adds $500 of credit every month for 12 months ($6,000), on top of any plan; up to 5 codes stack (1: $500, 2: $1,100, 3: $1,750, 4: $2,400, 5: $3,000 a month). Sold directly (sales@xiomid.com); details at https://xiomid.com/limited-offer. - Retries within 30 days, abandoned sessions and sandbox use are free. - Document templates for Türkiye, Pakistan (CNIC, NICOP), India (Aadhaar, PAN, Voter ID) and Indonesia (e-KTP, KITAS, KITAP), plus passports and ID cards worldwide. - AML lists: UN Security Council, EU, OFAC SDN, UK Sanctions List, MASAK, PEP and adverse media, with versioned lists and free re-screens when a list updates. - Also: ongoing monitoring (document expiry, periodic re-KYC), verification reuse across brands on one account, selfie re-checks for withdrawals and account recovery, fix-it retakes, desktop to phone handoff, live video help, GDPR and KVKK tools, white label and custom domains. - Data regions: European Union (Frankfurt) or United States (Virginia), chosen per brand. - Developers: REST API at https://api.xiomid.com/v1 with Bearer secret keys (sandbox and live), a hosted page or JavaScript SDK, signed webhooks and a free test mode (sandbox). Documentation: https://xiomid.com/docs. The full API reference follows below. - Sign up at https://app.xiomid.com/sign-up. Owned and operated by PT Brokeret Fintech Solutions. ## Public API (v1) Everything a backend needs to verify its users with xiomid. Server to server: never call the API from a browser or app with a secret key. - Base URL: https://api.xiomid.com/v1 - Authentication: `Authorization: Bearer `. Sandbox keys start `xsk_test_`, live keys `xsk_live_`; the key's mode decides the data (a sandbox key creates and sees only sandbox applicants, a live key only live ones; the other mode's ids are 404). Create keys in the dashboard under Developers → API keys (a Live/Test switch); the key can be revealed and copied there any time, and "Roll key" replaces a leaked one (the old key stops working at once). Test mode = sandbox: same API, `xsk_test_` key. - Environment variables used in every sample: `XIOMID_API_KEY` (the secret key), `XIOMID_WEBHOOK_SECRET` (the endpoint's `whsec_…` secret), and optionally `XIOMID_FLOW_ID`. Never put a literal key in code. - Requests and responses are JSON. Ids: applicants `apl_…`, flows `flw_…`, events `evt_…`. - Rate limit: 300 requests a minute per key (HTTP 429 with Retry-After). - Test mode (sandbox) is free: test applicants run the same flow and are never billed. On the test verification page a "Simulated result" picker (Approve, Review, Reject, Retake) chooses the outcome, so every webhook branch can be tested; nothing is forced by names or other input. - Webhook events carry everything: the summary fields (ids, status, decision, score, risk level, reason codes, your metadata) plus a `data` object. Decision events (applicant.reviewed, applicant.decision_changed, applicant.action_required) have `data.object = "report"`: exactly the GET /v1/applicants/{id}/report body (identity with the full document number, document, checks, AML screening, media). The other applicant events have `data.object = "applicant"`: exactly the GET /v1/applicants/{id} body. Branch on `data.object`. Events with their own body (screening.resolved, reauth.completed, privacy.erased) have no `data`; privacy.erased never carries personal data. - Media links in a webhook's `data.media` are signed and work for 24 hours (each item has `expiresAt`; no API key needed). Show them directly while valid, or download the files and store them in your own database/storage if you need them longer; after that call GET /v1/applicants/{id}/report for fresh links (those last 15 minutes). - Webhook bodies contain personal data (names, dates of birth, document numbers, links to ID photos and selfies): use an https endpoint, verify every signature, and protect what you store. When an applicant is erased (GDPR/KVKK), xiomid removes `data` from its stored deliveries, cancels any still queued, and sends privacy.erased: delete what you copied too. ### Endpoints - `GET /v1/me`: The organization and mode of the key. - `GET /v1/flows`: Your flows and their steps. - `POST /v1/applicants`: Create a case and its verification link. - `GET /v1/applicants/{id}`: Status, decision and identity. - `GET /v1/applicants`: Find cases by your user id or status. - `GET /v1/applicants/{id}/report`: Every check, the document and media links. - `POST /v1/applicants/{id}/sessions`: A fresh link for the same case. - `GET /v1/media/{id}?exp=&sig=`: a capture file from the report, behind a signed link (15 minutes from the API, 24 hours in a webhook; no key: the link is the authorization). ### Integrate in three steps 1. Your server creates an applicant: `POST https://api.xiomid.com/v1/applicants` with `externalUserId` (your user's id) and `flowId`. The answer is `{ applicant, session: { token, url, expiresAt } }`. 2. Send the user to `session.url` (a hosted, branded page; links last 7 days), or open `session.token` inside your page with the web SDK (below). 3. Receive the decision by signed webhook (`applicant.reviewed`, then `applicant.decision_changed` if a reviewer changes it), or read it with `GET /v1/applicants/{id}`. Match it to your user by `externalUserId`. ### POST /v1/applicants Creates a case on a published flow and its verification link. Live keys get 402 `out_of_credit` when the account's monthly credit and wallet are used up. - `externalUserId` (string, required): Your user’s id, up to 200 characters. Webhooks carry it back. - `flowId` (string): Which flow to run. Default: your organization’s first published flow. - `email` (string): Prefills the flow and receives reminders. - `phone` (string): In international format, +905551234567. - `language` (string): The flow’s language: en, tr, de. Default: the browser’s. - `returnUrl` (https URL): Where the hosted page sends the applicant after the result. - `metadata` (object): Flat JSON up to 4 KB, echoed in the API and every webhook. Send an `Idempotency-Key` header (any unique string, e.g. `kyc-`) so a retry can't create a second case: within 24 hours the same key with the same request returns the stored answer again (header `idempotent-replayed`), with a different request it is 409 `idempotency_conflict`, and while the first request still runs it is 409 `idempotency_in_progress`. A 5xx releases the key. ```bash curl https://api.xiomid.com/v1/applicants \ -H "Authorization: Bearer $XIOMID_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: kyc-10482" \ -d '{ "externalUserId": "10482", "email": "jane@example.com", "language": "en", "returnUrl": "https://crm.example.com/kyc/done", "metadata": { "accountId": "MT5-200481" } }' ``` Response (201): ```json { "applicant": { "id": "apl_7Kq2mX4p", "externalUserId": "10482", "flowId": "flw_3k9d2", "flowName": "Standard KYC", "status": "init", "decision": null, "score": null, "riskLevel": null, "reasonCodes": [], "identity": null, "email": "jane@example.com", "phone": null, "sandbox": true, "metadata": { "accountId": "MT5-200481" }, "createdAt": "2026-11-16T09:24:11Z", "submittedAt": null, "decidedAt": null, "session": { "token": "Hx4mP9rT2c", "url": "https://verify.xiomid.com/Hx4mP9rT2c?returnUrl=…", "expiresAt": "2026-11-23T09:24:11Z", "status": "active" } }, "session": { "token": "Hx4mP9rT2c", "url": "https://verify.xiomid.com/Hx4mP9rT2c?returnUrl=https%3A%2F%2Fcrm.example.com%2Fkyc%2Fdone", "expiresAt": "2026-11-23T09:24:11Z" } } ``` ### GET /v1/applicants/{id} and GET /v1/applicants One case: `status` (init, in_progress, processing, approved, review, rejected, action_required, expired), `decision` (approved, review, rejected or null), `score`, `riskLevel`, `reasonCodes`, `identity` (firstName, lastName, dateOfBirth, sex, nationality, address, documentType, documentKind, the full `documentNumber` as captured (masked only where the law requires it, e.g. Aadhaar), `documentNumberLast4`, issuingCountry, expiryDate; null when the document doesn't have it), `metadata`, timestamps and the current `session`. The list is newest first: filter by `externalUserId` or `status`, `limit` 1–100 (default 20), then pass `nextCursor` as `cursor`. Answer: `{ data: [...], nextCursor }`. ```json { "id": "apl_7Kq2mX4p", "externalUserId": "10482", "flowId": "flw_3k9d2", "flowName": "Standard KYC", "status": "approved", "decision": "approved", "score": 92, "riskLevel": "low", "reasonCodes": [], "identity": { "firstName": "Jane", "lastName": "Doe", "dateOfBirth": "1990-04-12", "sex": "F", "nationality": "GB", "address": null, "documentType": "passport", "documentKind": null, "documentNumber": "X1234567", "documentNumberLast4": "4567", "issuingCountry": "GB", "expiryDate": "2031-04-11" }, "email": "jane@example.com", "phone": null, "sandbox": true, "metadata": { "accountId": "MT5-200481" }, "createdAt": "2026-11-16T09:24:11Z", "submittedAt": "2026-11-16T09:29:52Z", "decidedAt": "2026-11-16T09:30:18Z", "session": { "token": "Hx4mP9rT2c", "url": "https://verify.xiomid.com/Hx4mP9rT2c", "expiresAt": "2026-11-23T09:24:11Z", "status": "submitted" } } ``` ### GET /v1/applicants/{id}/report The latest attempt's result: `checks` (id, label, status and detail for each check), `identity`, `document` (type, country, extra fields), `screening` (AML status and hits) and `media` (kind, url, contentType, expiresAt: signed links that last 15 minutes here; download them or fetch the report again later). ### POST /v1/applicants/{id}/sessions A fresh link for the same case. A case not finished yet keeps its attempt and gets 7 more days; a finished or expired one starts a new attempt. 409 `processing` while checks run. Optional body: `language`, `returnUrl`. Answer: `{ session: { token, url, expiresAt } }`. ### GET /v1/me and GET /v1/flows `/v1/me`: the key's organization and mode (`sandbox` or `live`), a quick key check. `/v1/flows`: the organization's flows, published or not, with their step types; use a published flow's `id` as `flowId`. ### Return URL With `returnUrl` (https), the hosted page sends the applicant back after the result with `?xiomid_status=&xiomid_session=`. Use it only for the message on screen: the webhook or the API is the source of truth. ### Webhooks Add an endpoint in the dashboard (Developers → Webhooks) with the events it listens to and its mode (sandbox or live). Each delivery is a POST with a JSON body and these headers: ```http POST /webhooks/xiomid HTTP/1.1 Content-Type: application/json X-Xiomid-Event: applicant.reviewed X-Xiomid-Delivery: dlv_9Kd02PsQx1 X-Xiomid-Signature: t=1794821500,v1=5f2b9c0e… ``` Verify every delivery before trusting it: the `X-Xiomid-Signature` header is `t=,v1=`, where v1 is HMAC-SHA256 of `"."` keyed with the endpoint's secret (`XIOMID_WEBHOOK_SECRET`). Use the raw body bytes (re-serialised JSON won't match), reject a `t` more than 300 seconds (5 minutes) from now, and compare in constant time. Answer 2xx within a few seconds and do the work in a background job. Failed deliveries are retried, so the same event can arrive twice: handle each event `id` once. Events: - `applicant.created`: A case was created: by the API, in the dashboard or by the sandbox generator. data.object: applicant. - `applicant.started`: The applicant opened the link and started the first step (once per attempt). Adds: attempt. data.object: applicant. - `step.completed`: The applicant finished a step. Adds: stepId, stepType, attempt. data.object: applicant. - `applicant.submitted`: Every step is done; the checks are running. data.object: applicant. - `applicant.reviewed`: The automatic decision: approved, review or rejected. Adds: reusedFrom. data.object: report. - `applicant.decision_changed`: A reviewer decided or changed the decision in the dashboard. Adds: previousStatus, reviewerName. data.object: report. - `applicant.action_required`: The applicant must redo one or more steps. Adds: stepIds, url, applicantMessage. data.object: report. - `applicant.monitoring_due`: Ongoing monitoring: a re-verification is due and the link was sent. Adds: kinds, stepIds, url, applicantMessage. data.object: applicant. - `screening.alert`: AML screening found a possible new match. Adds: screeningId, amlStatus, openHits, lists. data.object: applicant. - `screening.resolved`: A reviewer resolved an AML match. Adds: Own body: screeningId, hitId, list, kind, resolution, whitelisted, amlStatus. - `reauth.completed`: A selfie re-check finished, passed or failed. Adds: Own body: reauthId, reason, reference, status, similarity. - `privacy.erased`: The applicant’s data was erased on a GDPR or KVKK request. Adds: Own body: erasedAt. Common fields (every applicant.*, step.* and screening.alert event): id, type, applicantId, externalUserId, flowId, flow, status, decision, score, riskLevel, reasonCodes, sandbox, metadata, createdAt, data. `data` is the report (`data.object = "report"`) on decision events and the applicant (`data.object = "applicant"`) on the others, the same JSON the API returns. The "own body" events carry id, type, applicantId, externalUserId, sandbox and createdAt plus their own fields, and no `data`. Example `applicant.reviewed` body: ```json { "id": "evt_3Fq81Lz0aK", "type": "applicant.reviewed", "applicantId": "apl_7Kq2mX4p", "externalUserId": "10482", "flowId": "flw_3k9d2", "flow": "Standard KYC", "status": "approved", "decision": "approved", "score": 92, "riskLevel": "low", "reasonCodes": [], "sandbox": true, "metadata": { "accountId": "MT5-200481" }, "reusedFrom": null, "createdAt": "2026-11-16T09:30:18Z", "data": { "object": "report", "applicantId": "apl_7Kq2mX4p", "attempt": 1, "overall": 92, "decision": "approved", "checks": [ { "id": "face_match", "label": "Face match", "status": "pass", "detail": "The selfie matches the document photo." }, { "id": "liveness", "label": "Liveness", "status": "pass", "detail": "A live person completed the challenge." } ], "identity": { "firstName": "Jane", "lastName": "Doe", "dateOfBirth": "1990-04-12", "sex": "F", "nationality": "GB", "address": null, "documentType": "passport", "documentKind": null, "documentNumber": "X1234567", "documentNumberLast4": "4567", "issuingCountry": "GB", "expiryDate": "2031-04-11" }, "document": { "type": "passport", "country": "GB", "fields": { "placeOfBirth": "London" } }, "screening": { "status": "clear", "hits": 0 }, "media": [ { "kind": "doc_front", "url": "https://api.xiomid.com/v1/media/med_…?exp=…&sig=…", "contentType": "image/jpeg", "expiresAt": "2026-11-17T09:30:18.000Z" }, { "kind": "selfie", "url": "https://api.xiomid.com/v1/media/med_…?exp=…&sig=…", "contentType": "image/jpeg", "expiresAt": "2026-11-17T09:30:18.000Z" } ] } } ``` Signature check in Node.js (Express): ```js import crypto from 'node:crypto'; import express from 'express'; const app = express(); const SECRET = process.env.XIOMID_WEBHOOK_SECRET; // whsec_… // The raw body: re-serialised JSON won’t match the signature. app.post('/webhooks/xiomid', express.raw({ type: 'application/json' }), (req, res) => { const parts = Object.fromEntries( (req.get('X-Xiomid-Signature') ?? '').split(',').map((p) => p.trim().split('=', 2)), ); const t = Number(parts.t); const expected = crypto.createHmac('sha256', SECRET).update(`${parts.t}.`).update(req.body).digest('hex'); const given = Buffer.from(parts.v1 ?? ''); const fresh = Number.isInteger(t) && Math.abs(Date.now() / 1000 - t) <= 300; const valid = given.length === expected.length && crypto.timingSafeEqual(given, Buffer.from(expected)); if (!fresh || !valid) return res.sendStatus(400); const event = JSON.parse(req.body); // event.type, event.externalUserId, event.decision … res.sendStatus(204); }); ``` ### Errors Every error is JSON: `{ "code": "...", "message": "...", "errors": { "": ["..."] } }` (errors only on 422). - 401 `unauthenticated`: The Authorization header is missing, or the key is wrong or revoked. - 402 `out_of_credit`: A live case can’t start: the month’s credit and the wallet are used up. Sandbox is never charged. - 404 `not_found`: No such id for this key. A sandbox key never sees live cases, and the other way round. - 409 `idempotency_conflict`: The Idempotency-Key was used in the last 24 hours with a different body. - 422 `validation_error`: A field is missing or invalid; errors lists the messages per field. - 429 `rate_limited`: More than 300 requests a minute per key. Wait for Retry-After seconds. - 409 `idempotency_in_progress`: the first request with this Idempotency-Key is still running. - 409 `processing` (new session): the case is being checked; try again once it has a result. ### Web SDK Load https://verify.xiomid.com/sdk.js (or the versioned https://verify.xiomid.com/sdk.v1.js, cached longer) and open a session your server created. Modes: `inline` (inside a container), `modal` (an overlay) or `redirect` (the hosted page). `onComplete` gets the status for the screen; save the decision from the webhook. ```html
``` ## Code samples ### Laravel setup ```php // .env XIOMID_API_KEY=xsk_test_… # sandbox key; xsk_live_… in production XIOMID_WEBHOOK_SECRET=whsec_… # Developers → Webhooks → your endpoint // config/services.php 'xiomid' => [ 'key' => env('XIOMID_API_KEY'), 'webhook_secret' => env('XIOMID_WEBHOOK_SECRET'), ], // app/Providers/AppServiceProvider.php, boot() use Illuminate\Support\Facades\Http; Http::macro('xiomid', fn () => Http::baseUrl('https://api.xiomid.com/v1') ->withToken(config('services.xiomid.key')) ->acceptJson() ->timeout(15)); ``` ### Check the key (GET /v1/me) cURL: ```bash curl https://api.xiomid.com/v1/me \ -H "Authorization: Bearer $XIOMID_API_KEY" ``` PHP (Laravel): ```php $me = Http::xiomid()->get('me')->throw()->json(); $me['mode']; // 'sandbox' or 'live': the key decides ``` Response: ```json { "organization": { "id": "org_3fq8k2", "name": "Acme Markets" }, "mode": "sandbox", "keyName": "CRM staging" } ``` ### List flows (GET /v1/flows) cURL: ```bash curl https://api.xiomid.com/v1/flows \ -H "Authorization: Bearer $XIOMID_API_KEY" ``` PHP (Laravel): ```php $flows = Http::xiomid()->get('flows')->throw()->json(); ``` Response: ```json [ { "id": "flw_3k9d2", "name": "Standard KYC", "published": true, "steps": ["id_document", "liveness"] }, { "id": "flw_8m2q7", "name": "Proof of address", "published": false, "steps": ["proof_of_address"] } ] ``` ### Create an applicant (POST /v1/applicants) cURL: ```bash curl https://api.xiomid.com/v1/applicants \ -H "Authorization: Bearer $XIOMID_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: kyc-10482" \ -d '{ "externalUserId": "10482", "email": "jane@example.com", "language": "en", "returnUrl": "https://crm.example.com/kyc/done", "metadata": { "accountId": "MT5-200481" } }' ``` PHP (Laravel): ```php $response = Http::xiomid() ->withHeaders(['Idempotency-Key' => "kyc-{$user->id}"]) // a retry returns the same case ->post('applicants', [ 'externalUserId' => (string) $user->id, 'email' => $user->email, 'language' => app()->getLocale(), 'returnUrl' => route('kyc.done'), // https only 'metadata' => ['accountId' => $user->account_number], ]); if ($response->status() === 402) { // out_of_credit: live cases wait until the account has credit again } $data = $response->throw()->json(); $user->update(['xiomid_applicant_id' => $data['applicant']['id']]); return redirect()->away($data['session']['url']); // the hosted page ``` ### Bring the applicant back (returnUrl) ```php // routes/web.php: the hosted page sends the applicant back here after the result // https://crm.example.com/kyc/done?xiomid_status=approved&xiomid_session=Hx4mP9rT2c Route::get('/kyc/done', function (Request $request) { // Only for the message on screen. The webhook (or GET /v1/applicants/{id}) is the source of truth. $status = $request->query('xiomid_status'); // approved, review, rejected or action_required return view('kyc.done', ['status' => $status]); })->middleware('auth')->name('kyc.done'); ``` ### A fresh link (POST /v1/applicants/{id}/sessions) cURL: ```bash curl -X POST https://api.xiomid.com/v1/applicants/apl_7Kq2mX4p/sessions \ -H "Authorization: Bearer $XIOMID_API_KEY" ``` PHP (Laravel): ```php $session = Http::xiomid() ->post("applicants/{$user->xiomid_applicant_id}/sessions") ->throw() ->json('session'); // ['token' => …, 'url' => …, 'expiresAt' => …] return redirect()->away($session['url']); ``` ### Read a case and list cases cURL: ```bash curl https://api.xiomid.com/v1/applicants/apl_7Kq2mX4p \ -H "Authorization: Bearer $XIOMID_API_KEY" # Find a user’s cases, newest first (limit 1–100, then pass nextCursor as cursor) curl "https://api.xiomid.com/v1/applicants?externalUserId=10482&limit=20" \ -H "Authorization: Bearer $XIOMID_API_KEY" ``` PHP (Laravel): ```php $applicant = Http::xiomid()->get("applicants/{$id}")->throw()->json(); // Every case in review, page by page $cursor = null; do { $page = Http::xiomid()->get('applicants', array_filter([ 'status' => 'review', 'limit' => 100, 'cursor' => $cursor, ]))->throw()->json(); foreach ($page['data'] as $applicant) { // … } $cursor = $page['nextCursor']; } while ($cursor); ``` ### The report (GET /v1/applicants/{id}/report) cURL: ```bash curl https://api.xiomid.com/v1/applicants/apl_7Kq2mX4p/report \ -H "Authorization: Bearer $XIOMID_API_KEY" ``` PHP (Laravel): ```php $report = Http::xiomid()->get("applicants/{$id}/report")->throw()->json(); $failed = collect($report['checks'])->where('status', 'fail')->pluck('label'); // Media links are signed for 15 minutes (expiresAt): download now, or fetch the report again later foreach ($report['media'] as $file) { Storage::put("kyc/{$id}/{$file['kind']}", Http::get($file['url'])->body()); } ``` Response: ```json { "applicantId": "apl_7Kq2mX4p", "attempt": 1, "overall": 92, "decision": "approved", "checks": [ { "id": "document_authenticity", "label": "Document authenticity", "status": "pass", "detail": "Security features and fonts match a GB passport." }, { "id": "face_match", "label": "Face match", "status": "pass", "detail": "The selfie matches the document photo." }, { "id": "liveness", "label": "Liveness", "status": "pass", "detail": "A live person completed the challenge." }, { "id": "aml_screening", "label": "AML screening", "status": "pass", "detail": "No matches on sanctions or PEP lists." } ], "identity": { "firstName": "Jane", "lastName": "Doe", "dateOfBirth": "1990-04-12", "documentNumber": "X1234567", … }, "document": { "type": "passport", "country": "GB", "fields": { "placeOfBirth": "London", "issueDate": "2021-04-12" } }, "screening": { "status": "clear", "hits": 0 }, "media": [ { "kind": "doc_front", "url": "https://api.xiomid.com/v1/media/med_…?exp=…&sig=…", "contentType": "image/jpeg", "expiresAt": "2026-11-16T09:45:18.000Z" }, { "kind": "selfie", "url": "https://api.xiomid.com/v1/media/med_…?exp=…&sig=…", "contentType": "image/jpeg", "expiresAt": "2026-11-16T09:45:18.000Z" } ] } ``` ### Verify a webhook PHP (Laravel): ```php // routes/web.php Route::post('/webhooks/xiomid', XiomidWebhookController::class); // bootstrap/app.php: ->withMiddleware(fn ($m) => $m->validateCsrfTokens(except: ['webhooks/xiomid'])) namespace App\Http\Controllers; use App\Jobs\HandleXiomidEvent; use Illuminate\Http\Request; class XiomidWebhookController { public function __invoke(Request $request) { $body = $request->getContent(); // the raw body: re-encoded JSON won’t match $parts = []; foreach (explode(',', (string) $request->header('X-Xiomid-Signature')) as $part) { [$key, $value] = array_pad(explode('=', trim($part), 2), 2, ''); $parts[$key] = $value; } $t = $parts['t'] ?? ''; $expected = hash_hmac('sha256', $t.'.'.$body, config('services.xiomid.webhook_secret')); if (! ctype_digit($t) || abs(time() - (int) $t) > 300 || ! hash_equals($expected, $parts['v1'] ?? '')) { abort(400, 'Invalid signature'); } HandleXiomidEvent::dispatch(json_decode($body, true)); // answer fast, work in a job return response()->noContent(); } } ``` Node.js: ```js import crypto from 'node:crypto'; import express from 'express'; const app = express(); const SECRET = process.env.XIOMID_WEBHOOK_SECRET; // whsec_… // The raw body: re-serialised JSON won’t match the signature. app.post('/webhooks/xiomid', express.raw({ type: 'application/json' }), (req, res) => { const parts = Object.fromEntries( (req.get('X-Xiomid-Signature') ?? '').split(',').map((p) => p.trim().split('=', 2)), ); const t = Number(parts.t); const expected = crypto.createHmac('sha256', SECRET).update(`${parts.t}.`).update(req.body).digest('hex'); const given = Buffer.from(parts.v1 ?? ''); const fresh = Number.isInteger(t) && Math.abs(Date.now() / 1000 - t) <= 300; const valid = given.length === expected.length && crypto.timingSafeEqual(given, Buffer.from(expected)); if (!fresh || !valid) return res.sendStatus(400); const event = JSON.parse(req.body); // event.type, event.externalUserId, event.decision … res.sendStatus(204); }); ``` Python: ```python import hashlib, hmac, os, time from flask import Flask, abort, request app = Flask(__name__) SECRET = os.environ["XIOMID_WEBHOOK_SECRET"].encode() # whsec_… @app.post("/webhooks/xiomid") def xiomid_webhook(): body = request.get_data() # the raw bytes, not re-serialised JSON header = request.headers.get("X-Xiomid-Signature", "") parts = dict(p.strip().split("=", 1) for p in header.split(",") if "=" in p) t = parts.get("t", "") expected = hmac.new(SECRET, t.encode() + b"." + body, hashlib.sha256).hexdigest() if not t.isdigit() or abs(time.time() - int(t)) > 300 or not hmac.compare_digest(expected, parts.get("v1", "")): abort(400) event = request.get_json() # event["type"], event["externalUserId"], event["decision"] … return "", 204 ``` ### Handle an event once ```php // app/Jobs/HandleXiomidEvent.php, handle() $event = $this->event; // A retry can deliver the same event twice: handle each id once. if (! Cache::add("xiomid:{$event['id']}", true, now()->addDays(3))) { return; } $user = User::find($event['externalUserId']); match ($event['type']) { // data is the full report: identity (full document number), checks, AML screening, media links 'applicant.reviewed', 'applicant.decision_changed' => $user?->update([ 'kyc_status' => $event['decision'], 'kyc_document_number' => $event['data']['identity']['documentNumber'] ?? null, ]), 'applicant.action_required' => $user?->notify(new RedoVerification($event['url'], $event['applicantMessage'])), default => null, }; ``` ### Keep the captures from a webhook (links last 24 hours) ```php // In the job, for applicant.reviewed: save each capture to your own storage use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Storage; if ($event['type'] === 'applicant.reviewed') { $id = $event['applicantId']; // apl_7Kq2mX4p foreach ($event['data']['media'] as $i => $file) { // Signed links: no API key needed, valid until $file['expiresAt'] (24 hours) $extension = str_contains($file['contentType'], 'png') ? 'png' : 'jpg'; $path = "kyc/{$id}/{$i}-{$file['kind']}.{$extension}"; Storage::put($path, Http::timeout(30)->get($file['url'])->throw()->body()); KycFile::updateOrCreate(['applicant_id' => $id, 'path' => $path], ['kind' => $file['kind']]); } } // Later than that, ask for fresh links: // $report = Http::xiomid()->get("applicants/{$id}/report")->throw()->json(); ``` ### Handle errors ```http HTTP/1.1 422 Unprocessable Entity { "code": "validation_error", "message": "Check the highlighted fields.", "errors": { "returnUrl": ["Use an https URL."] } } ``` ```php use Illuminate\Http\Client\RequestException; try { $data = Http::xiomid()->post('applicants', $payload)->throw()->json(); } catch (RequestException $e) { $error = $e->response->json(); // ['code' => …, 'message' => …, 'errors' => […]] match ($e->response->status()) { 402 => report('xiomid: out of credit'), // top up; sandbox still works 422 => logger()->warning('xiomid', $error['errors'] ?? []), 429 => sleep((int) $e->response->header('Retry-After') ?: 60), default => throw $e, }; } ``` ## Pages - [xiomid. — Verification Platform](https://xiomid.com/): Trust at first sight. Identity verification, AML screening and ongoing monitoring in one flow: ID documents for 200+ countries, liveness, face match. $0.30 per verification, $25 of free credit every month. - [About xiomid](https://xiomid.com/about): xiomid is the verification platform of PT Brokeret Fintech Solutions, the group behind Brokeret, XiroLink and Chatyol. We built it for our own brands first. - [KYC Provider Alternatives: Compare and Switch](https://xiomid.com/alternatives): Alternatives to Sumsub, Veriff, Onfido, Didit, Persona, Jumio and more: how xiomid compares, what to ask every vendor, and how to switch in a day. $0.30 per verification. - [Brand assets](https://xiomid.com/brand): The xiomid logo, icon, app icons, colours and typeface for press and partners: outlined SVG and PNG files, usage rules and a press contact. - [Changelog: what's new in xiomid](https://xiomid.com/changelog): Every xiomid release: new features, improvements, security updates and fixes to identity verification, AML screening, the dashboard, the API and billing. - [Compare: xiomid and Typical KYC Providers](https://xiomid.com/compare): How xiomid compares with a typical KYC provider: one published price per check with no minimums, $25 of free credit a month, every feature on every plan, AML screening built in, and the questions to ask any vendor. - [Contact the xiomid Team](https://xiomid.com/contact): Talk to the xiomid team about identity verification and AML screening for your company, get help with the API, or ask about your data. - [Developers: KYC API, SDK and Webhooks](https://xiomid.com/developers): Add identity verification from your backend: create an applicant with one API call, send them to the hosted page or open the SDK, and receive every update as a signed webhook. Free sandbox. - [Didit Alternative: Every Check Priced Up Front](https://xiomid.com/didit-alternative): A Didit alternative with a published price for every step: $0.30 per full verification, AML $0.10, proof of address $0.15, and $25 of free credit every month. - [Docs: KYC API, webhooks and SDK](https://xiomid.com/docs): How to add xiomid identity verification to your app: API keys and test mode, creating applicants, the hosted page and SDK, signed webhooks, errors and full code samples in cURL, PHP, Node.js and Python. - [FAQ: Identity Verification, AML and Pricing](https://xiomid.com/faq): Answers about xiomid: documents and countries, liveness, AML screening lists, pricing and free verifications, the API and webhooks, data regions, GDPR and KVKK. - [Product: KYC, AML and Monitoring](https://xiomid.com/features): Identity verification for 200+ countries, liveness and face match, AML screening, ongoing monitoring, reusable verifications, selfie re-checks, retakes, handoff and live help. - [AML Screening: Sanctions, PEP, Adverse Media](https://xiomid.com/features/aml-screening): AML screening against UN, EU, OFAC and UK sanctions, PEP lists and adverse media, with fuzzy name matching, list versions on record and free re-screens. - [Identity Verification (KYC) in a Minute](https://xiomid.com/features/identity-verification): Identity verification for 200+ countries: passports and MRZ, national IDs, liveness checks and face match, tamper and duplicate checks, decided in about a minute. - [Ongoing KYC Monitoring and Re-verification](https://xiomid.com/features/ongoing-monitoring): Ongoing KYC monitoring: document expiry reminders, periodic re-KYC by risk level, continuous AML re-screening and alerts, with a queue of who is due. - [Reusable KYC and Selfie Re-checks](https://xiomid.com/features/reuse-and-rechecks): Reuse a verification across the brands on your account, and confirm returning customers with a selfie re-check for withdrawals and account recovery. - [iDenfy Alternative: EU Data Region, GDPR Tools](https://xiomid.com/idenfy-alternative): An iDenfy alternative for European teams: data kept in Frankfurt per brand, GDPR and KVKK request tools, retention you set, and one published price per check. - [Incode Alternative: Self-Serve Identity Verification](https://xiomid.com/incode-alternative): An Incode alternative you can try without a sales call: liveness and face match, document checks, AML screening and a free sandbox, priced per check. - [Jumio Alternative: Start Self-Serve, Scale on Credit](https://xiomid.com/jumio-alternative): A Jumio alternative you can start today: sign up without a card, $0.30 per verification, monthly plan credit, and an Enterprise contract only if you want one. - [Launch Offer: $6,000 of Credit for $499](https://xiomid.com/limited-offer): The xiomid launch offer: pay $499 once and get $500 of verification credit every month for 12 months, $6,000 in all. Buy up to 5 codes for more each month. - [Ondato Alternative: KYC, AML and Monitoring](https://xiomid.com/ondato-alternative): An Ondato alternative with ongoing monitoring included: document expiry reminders, re-KYC by risk level, free AML re-screens, and one published price per check. - [Onfido Alternative: Self-Serve KYC With Flows](https://xiomid.com/onfido-alternative): Comparing Onfido alternatives? xiomid gives you versioned flows, document and liveness checks, AML screening and $25 of credit a month. No contract. - [Persona Alternative: KYC, AML and Review in One](https://xiomid.com/persona-alternative): A Persona alternative with a ready-made flow: ID documents, liveness, face match, AML screening, a review queue and monitoring in one product, priced per check. - [Pricing: $0.30 per Verification, $25 Free Monthly](https://xiomid.com/pricing): xiomid pricing: $0.30 per full verification, the same on every plan. Free gives $25 of credit a month; Pro $150 of credit for $99 a month, Business $400 for $299. Every feature on every plan. - [Security and Compliance](https://xiomid.com/security): How xiomid protects identity data: encryption, private storage, EU or US data regions, GDPR and KVKK tools, retention controls, audit trails, sealed case records and sanctions lists. - [Shufti Pro Alternative: CNIC, Aadhaar and e-KTP](https://xiomid.com/shufti-pro-alternative): A Shufti Pro alternative with document templates for Pakistan (CNIC, NICOP), India (Aadhaar, PAN), Türkiye and Indonesia, MASAK screening and per-check prices. - [Solutions: KYC for Brokers, Fintech, Crypto and More](https://xiomid.com/solutions): How brokers, fintech and payment companies, crypto platforms, marketplaces and gaming operators use xiomid for identity verification, AML screening and monitoring. - [KYC for Forex Brokers and Prop Firms](https://xiomid.com/solutions/brokers-and-trading): KYC and AML for forex and CFD brokers and prop firms: ID, liveness and face match in about a minute, sanctions and PEP screening, selfie re-checks before withdrawals. - [KYC and AML Screening for Crypto Platforms](https://xiomid.com/solutions/crypto): KYC for crypto exchanges, wallets and on-ramps: ID and liveness in about a minute, sanctions and PEP screening, duplicate face checks and selfie re-checks before withdrawals. - [KYC and AML for Fintech and Payments](https://xiomid.com/solutions/fintech-and-payments): Identity verification and AML screening for fintech and payment companies: ID and liveness, sanctions and PEP checks, ongoing monitoring and selfie re-checks. - [Age and Identity Verification for Gaming](https://xiomid.com/solutions/gaming): Identity and age verification for gaming and betting platforms: minimum-age checks, duplicate account detection, AML screening and selfie re-checks before payouts. - [Identity Verification for Marketplaces](https://xiomid.com/solutions/marketplaces): Verify sellers, hosts, drivers and members with an ID and a selfie: age checks, duplicate account detection and a hosted flow on your own domain, with $25 of free credit a month. - [Stripe Identity Alternative: Add AML and Monitoring](https://xiomid.com/stripe-identity-alternative): A Stripe Identity alternative that works with any payment provider: ID and selfie checks, AML screening, ongoing monitoring, reviewer queues and white label. - [Sumsub Alternative: Published Prices, No Minimums](https://xiomid.com/sumsub-alternative): Looking for a Sumsub alternative? xiomid verifies IDs, liveness and face match for $0.30 per case, with AML screening, a free sandbox and no minimums. - [Trulioo Alternative: Document and Selfie KYC](https://xiomid.com/trulioo-alternative): A Trulioo alternative for document and selfie verification: ID checks for 200+ countries, liveness, face match and AML screening for $0.30 per case. - [Veriff Alternative: Per-Check Pricing, Free Sandbox](https://xiomid.com/veriff-alternative): A Veriff alternative with one published price per check: $0.30 per verification, $25 free monthly credit, AML screening and signed webhooks. ## Legal - [Cookie Notice](https://xiomid.com/cookies): What xiomid.com, the xiomid dashboard and the capture flow store on your device: no advertising or tracking cookies, only what is needed to work. - [Privacy Policy](https://xiomid.com/privacy): xiomid privacy policy: what we collect, how we handle verifications for our customers, biometric data, automated checks, sub-processors, retention and your rights. - [Terms of Service](https://xiomid.com/terms): The terms for using xiomid: accounts, plans and usage, fees and credits, your applicants’ data, checks and decisions, acceptable use and ending the service.