Skip to main content
This quickstart uses the BLAAIZ_HOSTED fulfilment mode. Your customer opens a Blaaiz page, uploads the identity document, and does the selfie there. You write no capture code. The capture 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 BLAAIZ_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 capture 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.
verification_link and link_expires_at are always null for a BLAAIZ_HOSTED session. The capture link comes from the endpoint in step 3.
applicant.country uses the three-letter ISO 3166-1 alpha-3 code, such as NGA or CAN.
The link is valid for 30 minutes. Use the capture_url value exactly as it is returned. The host is different in development, so do not build the URL yourself.
The capture_url 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.
Send the capture_url to the person by email, SMS, or in your own app. The page asks the person for each step of the set in turn. If the link expires before the person opens it, call the capture-link endpoint again. Blaaiz issues a new link and the old link stops working at that moment. Use the same call when a link leaks. The capture-link endpoint fails when the session is terminal, and when fulfilment_mode is not BLAAIZ_HOSTED. Every BLAAIZ_HOSTED session can take a capture link, including a session with no selfie step.

Step 5: 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.

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 capture link. This call needs the compliance-kyc:cancel scope.
A cancel on a session that is already terminal succeeds and changes nothing.
Do not call the submit endpoint for a hosted session. The person submits the session on the capture page.