Changelog

KYC

Release notes for aice-kyc and @aiceafrica/kyc.

Python: aice-kyc

0.1.0 (unreleased)

First release.

Added

  • KycClient and AsyncKycClient, authenticating with the console project key (api_key) and the acting user (user_id, user_role, user_scopes). The acting user is the customer, and the tenant is the key's project. base_url includes the /api/v1/kyc prefix.
  • verify.start(doc_type, doc_number, country, metadata=, triggered_by=) and verify.status() for the acting user's own verification.
  • face: create_upload (presigned upload for a document or frame image), analyze_document(object_key), create_capture_session(analysis_id) and match(analysis_id, capture_token, frames | object_keys). Frame bytes are base64-encoded for you.
  • admin (admin or owner): customer_status(customer_id), stats, accept(customer_id, kyc_document_id, note=), recheck(customer_id, kyc_document_id=) and face_review.
  • Per-project verifiers: admin.list_verifiers returns each verifier's effective settings, what the platform allows, and whose credentials it uses (the last four characters of the project's own, never the values). admin.configure_verifier(verifier_id, **changes) turns a verifier on or off, chooses sandbox or live, narrows its countries and document types, sets its priority, and stores the project's own registry credentials (write-only). Only the fields given change; None restores the platform value and reset restores all of them. A verifier the platform withholds, or keeps in sandbox, answers 409. admin.test_verifier(verifier_id) checks the registry can be reached with the project's settings.

Notes

  • Compliance calls (verify.start, face.create_upload, face.create_capture_session, face.match, admin.accept, admin.recheck, admin.face_review and the verifier admin calls) are sent once and never retried, since a retry could repeat a compliance action or spend one of the customer's match attempts.
  • Requires aice-core>=0.3.0,<0.5.

TypeScript: @aiceafrica/kyc

0.2.0 (unreleased)

Changed BREAKING

Rewritten to match the KYC service; no call in 0.1.x reached it correctly. KYC now authenticates like every AICE service.

  • The client takes the console project key (apiKey) and the acting user (userId, userRole, userScopes), sent as Authorization: Bearer and X-User-*. No request carries a tenant: the tenant is the key's project.
  • The acting user is the customer (the service takes it from X-User-Id and refuses a customer_id in self-service bodies with 422). verify.start, face.createUpload, face.analyzeDocument, face.createCaptureSession and face.match take no customer_id. verify.status() takes no argument and returns the acting user's own status; admin.customerStatus(customerId) reads another customer's (admin).
  • baseUrl includes the /api/v1/kyc prefix, like every AICE client.
  • verify.start takes doc_type, doc_number, country, metadata, triggered_by (which accepts agent).
  • face.analyzeDocument sends JSON with an object_key (the image already in storage) instead of uploading a file.
  • face.createCaptureSession takes analysis_id.
  • face.match sends JSON with analysis_id, capture_token and frames (image bytes are base64-encoded for you) or object_keys, instead of a multipart upload with session_id.
  • admin.accept takes customer_id, kyc_document_id and note; admin.recheck needs admin and takes an optional kyc_document_id; admin.faceReview takes named fields, and the reviewer is the acting user.
  • face.match and admin.faceReview are sent once, never retried, like the other compliance calls: a retried match would spend one of the customer's attempts.

Added

  • face.createUpload: a presigned upload for a document or frame image (POST /uploads).
  • Projects configure their own verifiers (needs user_role admin or owner):
    • admin.listVerifiers() returns each verifier's settings for the project, what the platform allows, and whose credentials it runs with (the last four characters of the project's own, never the values).
    • admin.configureVerifier(verifierId, changes): turn a verifier on or off, choose sandbox or live, narrow its countries and document types, set its priority, and store the project's own registry credentials (write-only), e.g. configureVerifier("iprs", { mode: "live", credentials: { api_key: "…" } }). Only the fields given change; null puts one back on the platform's value, reset puts everything back. A verifier the platform withholds, or keeps in sandbox, answers 409.
    • admin.testVerifier(verifierId): can the registry be reached with this project's settings.
  • VERSION, this package's version.

Changed

  • Needs @aiceafrica/core 0.4.

0.1.1

Changed

  • verify.start, admin.accept, admin.recheck, and face.createCaptureSession now pass idempotencyKey: null explicitly, opting out of @aiceafrica/core 0.2.0's new default auto-retry behavior. TODO(backend): remove this override once kyc_service confirms it dedupes on the Idempotency-Key header.

On this page