Developers

Deploy a standard sidecar in your own infrastructure

Run the sidecar alongside your core system. It handles token verification, signatures, encryption, CamDX routing, and audit logging while your application makes a handful of REST calls.

Reference architecture

Each member runs its own sidecar within its own infrastructure. Personal data travels strictly sidecar to sidecar over CamDX, while the Auth Portal displays QR codes and relays reference tokens only.

Your core system
Your sidecar
Signed KYC data · CamDX
Auth Portal
Tokens only
Partner sidecar
Partner core + app

eKYC Data Requester

Receive verified data in four steps

  1. 1

    Request a login token

    Ask your sidecar for a Login Token at the tier you need, specifying the URL your customer returns to.

  2. 2

    Send the customer to the Auth Portal

    Redirect the browser or open the app link with the token. The portal validates your membership and presents the QR code.

  3. 3

    Handle the callback

    The portal returns the customer to your callback URL with a single-use Auth Token, as well as declined, expired, or already-used states.

  4. 4

    Fetch the verified data

    Pass the Auth Token to your sidecar, which redeems it over CamDX, verifies the attestation, and returns the consented fields.

token/request
POST /api/v1/requester/token/request
x-api-key: <key>
x-api-secret: <secret>

{
  "tier": 1,
  "callback": "https://app.example.com.kh/ekyc/callback",
  "callback_type": "web"
}

→ 200 { "token": "eyJhbGciOiJFUzUxMiIs…" }
kyc/fetch
POST /api/v1/requester/kyc/fetch
x-api-key: <key>
x-api-secret: <secret>

{ "auth_token": "eyJhbGciOiJFUzUxMiIs…", "tier": 1 }

→ 200 {
  "ref_id": "9f2c41d0-…",
  "tier": 1,
  "data": { /* signed OpenAttestation, fields above T1 sealed */ },
  "attested": {
    "first_name": "Somnang",
    "last_name": "Sok",
    "document_type": "NID",
    "dob": "1990-01-01",
    …
  }
}

eKYC Data Provider

Share verified customer data with consent

  1. 1

    Scan and verify

    Your app scans the QR code (or opens from the portal's app link) and your core system calls token/verify to receive the verified Requester and tier.

  2. 2

    Show the consent screen

    Display the Requester's verified name, domain, and requested data tier, and re-authenticate the customer before they tap Allow.

  3. 3

    Submit or authorise

    For a first-time exchange, call kyc/submit with the customer's data; for a returning customer, call kyc/authorize with the saved attestation_ref to issue the Auth Token.

  4. 4

    Keep records current

    When customer KYC changes or consent is withdrawn, call kyc/invalidate. Your sidecar handles resolve and ping requests on CamDX with no extra code.

token/verify
POST /api/v1/provider/token/verify
x-api-key: <key>
x-api-secret: <secret>

{ "token": "<login token from the QR code>" }

→ 200 {
  "valid": true,
  "payload": { /* verified Requester, tier and callback */ … }
}
kyc/submit | kyc/authorize
POST /api/v1/provider/kyc/submit      /* first time */
x-api-key: <key>
x-api-secret: <secret>

{
  "tier": 1,
  "user_id": "cust_10293",
  "login_token": "eyJhbGciOiJFUzUxMiIs…",
  "data": { "user_info": { "first_name": "Somnang", … } }
}

POST /api/v1/provider/kyc/authorize   /* returning customer */
x-api-key: <key>
x-api-secret: <secret>

{
  "user_id": "cust_10293",
  "attestation_ref": "…",
  "login_token": "eyJhbGciOiJFUzUxMiIs…"
}

What you set up once

Signing key

An EC P-521 key pair with the public key published in DNS as an ekyc_pub TXT record on your issuer domain.

Attestation wallet

Signs OpenAttestation documents and binds to your domain via an openatts DNS-DID TXT record.

PII key

A 32-byte key for AES-256-GCM encryption at rest, stored in a secret manager separate from the database.

Infrastructure

Docker or Kubernetes, PostgreSQL, and a CamDX Security Server, keeping the sidecar off the public internet.

DNS TXT records on your issuer domain
ekyc.yourorg.com.kh.  TXT  "ekyc_pub=AgFx…"
ekyc.yourorg.com.kh.  TXT  "openatts a=dns-did; p=did:ethr:0xAbC…#controller"

API map

EndpointCalled byPurpose
POST /api/v1/requester/token/requesteKYC Data Requester coreIssue a login token
POST /api/v1/requester/kyc/fetcheKYC Data Requester coreRedeem an auth token and return verified data
POST /api/v1/provider/token/verifyeKYC Data Provider coreVerify a login token before showing consent
POST /api/v1/provider/kyc/submiteKYC Data Provider coreNew customer: attest, encrypt, and issue auth token
POST /api/v1/provider/kyc/authorizeeKYC Data Provider coreReturning customer: issue auth token
POST /api/v1/provider/kyc/invalidateeKYC Data Provider coreWipe cached data and revoke on CamDL
POST /api/v1/provider/kyc/resolve/t{0-3}Partner sidecar via CamDXDeliver the attestation at a tier, once
GET /api/v1/provider/kyc/pingPartner sidecar via CamDXConnectivity and allowlist check

Core-to-sidecar calls use the x-api-key and x-api-secret headers. Every running sidecar serves interactive OpenAPI docs at /reference.

Before you go to production

  • DNSSEC enabled on your issuer domain
  • Signing key, wallet, and PII key stored in a secret manager, never in container images or Git
  • Sidecar reachable only from your core system and your CamDX Security Server
  • Tokens excluded from application and proxy logs
  • Audit log retained for your regulator's retention period (typically 5–7 years)
  • Tested across all tiers: decline, expiry, replay, disabled partner, and zero PII in the portal or logs

Go deeper in the documentation

Technical documentation is shared with participating organisations during onboarding.

Join the network

ចូលរួមជាមួយបណ្តាញ eKYC ឆ្លងស្ថាប័ន

Connect your institution to the network

Send us your organisation details and intended role. Our onboarding team will reply with membership steps and technical setup instructions.