Liveness integration guide for web and mobile apps
Biometrics IDV v2
Choose a version in your integration by its URL. Existing integrations can continue using their original endpoints.
Send JSON with your x-api-key header. Include an Idempotency-Key on each production POST and reuse it when retrying the same request. Sandbox checks use simulated results and cost zero credits.
Prices below are standard API rates in rand excluding VAT. Your enterprise credit rate determines your effective price. View pricing.
Check your wallet and remaining prepaid checks with GET /api/external/wallet/balance.
Liveness and basic SA ID verification
POST /api/external/v2/biometrics/liveness-id-verificationCreate a guided liveness and Home Affairs face verification link for any industry. The subject enters their SA ID number on the capture page.
- mode
- sandbox or production
- type
- hybrid or active
- reference
- Optional customer reference
- callback_url
- Optional HTTPS callback
- webhook_secret
- Required with callback; 32 to 256 characters
- return_url
- Optional HTTPS return URL
Production requires Idempotency-Key. Send capture_url to the subject, then poll GET /api/external/v2/biometrics/liveness/sessions/{session_token} with the original API key or receive the signed callback.
Completed results include liveness, overall decision, face_verify when a comparison ran, and home_affairs with only lookup_outcome and id_valid (true, false or null). not_run indicates that the liveness gate skipped the lookup. null means validity could not be established.
Biometrics IDV Age Estimate
POST /api/external/v2/biometrics/age-estimateEstimate the age range of one face in a selfie.
- mode
- sandbox or production
- image_base64
- One face photo, up to 3 MiB
R2.60 excl. VAT (1 credit) per Age Estimate check.
Production requires an Idempotency-Key. Sandbox checks use simulated results and zero credits.
Biometrics IDV Face Compare
POST /api/external/v2/biometrics/face-compareCompare two photos with one face per photo.
- mode
- sandbox or production
- source_image_base64
- First photo, up to 1.6 MiB
- target_image_base64
- Second photo, up to 1.6 MiB
R2.60 excl. VAT (1 credit) per Face Compare check using two supplied photos.
Production requires an Idempotency-Key. Sandbox checks use simulated results and zero credits.
Biometrics IDV Face Verify
POST /api/external/v2/biometrics/face-verifyCompare a selfie with a Home Affairs reference photo.
- mode
- sandbox or production
- selfie_image_base64
- Selfie, up to 3 MiB
- id_number
- 13-digit South African ID number
R26.00 excl. VAT per Home Affairs Face Match (10 credits), including the photo lookup and comparison.
Production requires an Idempotency-Key. Sandbox checks use simulated results and zero credits.
Biometrics IDV liveness session
POST /api/external/v2/biometrics/liveness/sessionsCreate a guided capture link. The customer can request Face Verify with the same session.
- mode
- sandbox or production
- type
- hybrid or active
- verify_id_number
- Optional SA ID number
- addon
- Optional: face_compare or age_estimate, run on a passing capture in the same session. Not combined with Face Verify.
- reference_image_base64
- Required with addon face_compare: the ID photo to compare with (JPEG, PNG or WebP, up to 3 MiB). Stored encrypted only until the comparison, then deleted.
- reference
- Optional customer reference
- callback_url
- Optional HTTPS webhook URL
- webhook_secret
- Required with a callback, 32 to 256 characters
- return_url
- Optional HTTPS destination after capture
R2.60 excl. VAT for 2 liveness checks (R1.30 per check) at the starter rate. One credit buys the pair. Use the second check for either Hybrid or Active Liveness.
Liveness + Face Compare and Liveness + Age Estimate: R2.60 excl. VAT (1 credit) per session when the capture passes and the add-on completes.
Production requires an Idempotency-Key. Give the subject the complete capture_url, including its fragment. Keep session_token on your server for polling.
The link expires after ten minutes. A started capture has its own deadline. Review or failed liveness scores skip face matching. One prepaid credit buys two completed liveness-only checks, shared across Hybrid and Active in the same wallet.
With addon face_compare, completed results include face_compare (decision, similarity, threshold) comparing the capture with the supplied ID photo. With addon age_estimate, they include age_estimate.age_range (low, high) estimated from the capture. Review or failed liveness scores skip the add-on and charge the liveness price.
Webhook signatures use HMAC-SHA256 of timestamp, a period and the raw JSON body. Verify the v1= hex digest in x-verifynow-signature using x-verifynow-timestamp. Deduplicate deliveries by x-verifynow-event-id.
Biometrics IDV liveness result
GET /api/external/v2/biometrics/liveness/sessions/{token}Poll with the original API key and session_token for the outcome. Terminal results are available for 72 hours.
Choosing Active or Hybrid liveness
- Hybrid is our default. The person moves their face into an oval on screen, with no flashing colours, so the check is a few seconds faster and suits people who are sensitive to flashing lights.
- Active gives the highest accuracy. The person moves their face toward the screen, then holds still while a series of colours flash. Choose it when accuracy matters more than speed.
- Match the check to your risk: weigh the fraud you expect against how many genuine customers you can afford to send to review, and try different confidence score thresholds before going live.
- Add other controls too, such as one-time PINs (OTPs) and IP-based location checks.
- Securing the device or app the video selfie is sent from stays your responsibility.
Liveness device requirements
The person completing a Hybrid or Active liveness capture needs:
- A front-facing colour camera that records at least 15 frames per second at 480 × 640 pixels or higher
- No virtual camera or camera software
- A screen of at least 4 inches with a refresh rate of 60 Hz or more
- A device that is not jailbroken or rooted
- A connection of at least 100 kbps
- One of the latest three versions of Chrome, Firefox, Safari or Edge
- On a computer, a webcam mounted on top of the screen showing the check
Single-photo Passive Liveness is pending for v2. Existing customers can use their original Passive Liveness endpoint.