Skip to main content
This quickstart uses the HOSTED fulfilment mode. Your customer opens a verification page, uploads the identity document, and does the selfie there. You write no capture code. Blaaiz hosts that page, or the Blaaiz verification partner hosts it. Blaaiz makes that choice for your business. Your integration is the same either way: send the person the verification_link from the create response. The page also collects the proof of address when the session asks for it. The page shows one step for each requirement in the set, and nothing more. Read Merchant KYC overview first for the session model.

Before you start

  • Merchant KYC must be enabled for your business.
  • Your OAuth credentials must carry the compliance-kyc:create and compliance-kyc:read scopes.
  • Your kyc_url webhook must be registered. See Merchant KYC webhooks.
The examples use the production base URL https://api-prod.blaaiz.com. For development, use https://api-dev.blaaiz.com.

Flow

Step 1: Get an access token

Step 2: Create the session

Ask for the full set — DOCUMENTS, SELFIE, and FACE_MATCH — and set fulfilment_mode to HOSTED. To collect the proof of address on the same page, add PROOF_OF_ADDRESS to requirements. The applicant object is optional. Send the details you already hold so that the person types less on the verification page.
The response returns the session:
Store data.id against your own record for user_10482. You need the session id for every later call. Read data.verification_link and data.link_expires_at from this response. A HOSTED session carries both while it waits for the person. After the session moves to review or closes, both fields are null. Use the verification_link value exactly as it is returned. The host differs between environments, so do not build the URL yourself.
verification_link comes back on the create call only. The read endpoints never return it. Store it, or issue a new link with the endpoint in the section “Issue a new verification link”.
applicant.country uses the three-letter ISO 3166-1 alpha-3 code, such as NGA or CAN. Send the verification_link to the person by email, SMS, or in your own app. The page asks the person for each step of the set in turn.
The verification_link is a live credential for one session. Anybody who holds it can submit the verification. Send it over a private channel, and keep it out of your logs.

Step 4: Wait for the webhook

When the review completes, Blaaiz posts merchant.kyc.session.completed to your kyc_url:
Verify the x-blaaiz-signature header before you trust the payload. See Merchant KYC webhooks. The link stops working at link_expires_at. If the link expires before the person opens it, issue a new one. Use the same call when a link leaks.
Send the new link to the person. The previous link may stop working as soon as Blaaiz issues a new one, so treat the newest link as the only valid one. This endpoint works for every HOSTED session, including a session with no selfie step. Blaaiz refuses the call when the session is terminal, and when the session is HEADLESS.

Check the status at any time

You do not have to wait for the webhook to read the state of a session:
Use the webhook as the trigger for your own work. Use the read endpoints to reconcile.

Cancel a session

If the person abandons the flow, cancel the session. A cancel frees a slot under your open-session cap and kills the verification link. This call needs the compliance-kyc:cancel scope.
A cancel on a session that is already terminal is refused with 422. A cancelled session answers This session has already been cancelled.; an approved, rejected or expired session answers This session has already reached a final state and cannot be cancelled. A cancel also closes the person’s verification page: after it, the person cannot continue or upload.
Do not upload documents and do not call the submit endpoint for a HOSTED session. The document endpoints and the submit endpoint answer a HOSTED session with 422 and this message: