Guides
Face Match and KYC
Validate the player's face in a selfie journey and query a CPF's registration data, compliance and bet restrictions.
Face Match and KYC don't move money: they help you know the player before deposits and withdrawals. Face Match is a selfie journey, notified to the faceMatchUrl. KYC is a set of queries by CPF; the synchronous ones answer right away and the asynchronous ones report to the kycUrl.
Face Match
1. Create the journey
curl --request POST \
--url https://okto.mimicr.dev/face-match/journey \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"taxId": "123.456.789-09",
"flow": "onboarding_with_docs",
"redirectUrl": "https://sua-app.dev/face-match/fim"
}'{
"id": "81169523-d38d-4700-8d3c-d01497c33c55",
"providerId": "171c1ba7-94b8-4f7e-ac73-9aa73c1ae97d",
"status": "processing",
"url": "https://okto.mimicr.dev/mimicr/face-match/81169523-d38d-4700-8d3c-d01497c33c55",
"created": "2026-10-21T19:09:23.017Z",
"externalId": "1426e891-d319-4d0f-8b2c-86cb84806cb9"
}| Field | Rule | Error |
|---|---|---|
taxId | Valid CPF | 2001 |
flow | onboarding_with_docs, onboarding_with_docs_and_score or already_validated_face | 4442, 4443 |
redirectUrl | http(s) URL | 4442, 4443 |
externalId | Optional (generated when omitted) | 2010 |
2. The player takes the selfie
Open the url. On the hosted page the player chooses "Tirar a selfie" (take the selfie) or "Desistir" (give up) and comes back to redirectUrl?journeyId=<id>. Through the control API:
npx mimicr action okto player.step step=face-match:selfie id=81169523-d38d-4700-8d3c-d01497c33c55 npx mimicr wait okto delivery transaction_id=81169523-d38d-4700-8d3c-d01497c33c55 event=success
| Case | Status | Code |
|---|---|---|
CPF 123.456.789-09 or another regular CPF | success | — |
CPF 111.444.777-35 | rejected | 4203 |
| CPF rejected by the tests | rejected | 4202 |
Player gives up (face-match:giveup) | failed | 4303 |
| 1 hour without a selfie | expired | — |
The notification is FaceMatchJourney with id, providerId, flow, status, errorList, created and expiresAt. Check it with Get journey status.
KYC
1. Record the terms acceptance
Every CPF query requires the player to have accepted the terms. Without it, the answer is 400 with 6000.
curl --request POST \
--url https://okto.mimicr.dev/kyc/terms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "cpf": "45317828791", "status": "accepted" }'status only takes accepted (4443). Delete terms acceptance undoes it.
2. Basic data (synchronous)
Get basic data answers right away with status and personData:
{
"status": "REGULAR",
"personData": {
"name": "OTÁVIO RAMOS",
"birthDate": "1990-05-10",
"taxIdNumber": "45317828791",
"taxIdStatus": "REGULAR",
"hasObitIndication": false,
"message": "Reprovado (PEP)"
}
}status follows the test CPFs: REGULAR, DECEASED, MINOR, NOT_FOUND, REGULARIZATION_PENDING, SUSPENDED or CANCELED_CRAFT. PEP and sanctioned CPFs are REGULAR here; they show up in the compliance query.
3. Asynchronous queries
These queries answer only a transactionId and send the result to the kycUrl (set it with Update notification URLs):
| Query | Result section |
|---|---|
| Compliance | compliance (PEP, sanctions, electoral donations) |
| Addresses | addresses |
| Addresses (new source) | addressesNew |
| Phones | phones |
| Phones (new source) | phonesNew |
| E-mails | emails |
| Bet restrictions | betRestrictionsSportsData |
curl --url https://okto.mimicr.dev/kyc/compliance/45317828791 \ --header 'Authorization: Bearer <token>'
{ "transactionId": "58bf127c-4042-4250-8acf-9035d42e1824" }The notification (and Get a KYC result, GET /kyc/{transactionId}) carries:
{
"id": "58bf127c-4042-4250-8acf-9035d42e1824",
"cpf": "45317828791",
"status": "REPROVED",
"errorList": [],
"compliance": { "statusCode": "01", "data": { "isCurrentlyPEP": true, "isCurrentlySanctioned": false } }
}status is APPROVED, except in the compliance query of PEP, sanctioned or not-found CPFs, which comes back REPROVED.
npx mimicr wait okto delivery kind=kyc transaction_id=58bf127c-4042-4250-8acf-9035d42e1824
Onboarding and ZIP codes
- Start onboarding returns
id,requestId,tokenand an onboardingurl. In Mimicr that page is only illustrative; the result comes through the queries above. - Look up a ZIP code takes 8 digits (with or without the hyphen; otherwise
1000).
In Mimicr, the returned data (address, phone, e-mail, parents' names) is fictitious and the same for every CPF; only the status, PEP and sanctions change with the test CPFs. Every valid ZIP code returns the same address.