Guides
Testing in the sandbox
Okto's test CPFs, error triggers, KYC and Face Match outcomes and per-product controlled chaos.
By default, every player with a valid CPF passes KYC and every approved payment ends paid. To exercise the other paths, use the test data from Okto's Swagger, which Mimicr reproduces, or controlled chaos.
Test CPFs
The outcome shows up when the player acts (pays the QR, approves at the bank) or when the withdrawal is processed, 15 seconds after creation, not in the creation response.
| CPF | KYC status | Code when the player pays or receives |
|---|---|---|
604.184.437-34, 617.750.603-81 | REGULAR | none, approved |
186.265.157-40 | REGULAR_EXPIRED | none, approved |
051.375.187-43, 111.090.128-37 | DECEASED_HOLDER | 2015 Payment refused due to deceased cpf status |
211.115.937-95, 216.183.447-90 | MINOR | 2014 Payment refused due to minor cpf status |
707.726.010-03 | NOT_FOUND | 4202 CPF Rejected on KYC |
028.385.850-88, 106.049.566-06 | REGULARIZATION_PENDING | 4202 |
612.445.243-01, 129.748.148-83 | SUSPENDED | 4202 |
031.819.767-76 | CANCELED_CRAFT | 4202 |
453.178.287-91 | PEP | 2019 Payment refused due to cpf belonging to pep or sanctioned list |
606.594.933-73 | SANCTIONS | 2019 |
Any other valid CPF is treated as REGULAR. CPFs with a wrong check digit are refused at creation with 2001.
Other triggers
| Value | Where | Outcome |
|---|---|---|
CPF 021.449.531-04 | payer | 2020 Payment rejected due to cpf mismatch validation failed |
CPF 001.408.346-99 | payer | 2023 Payment refused due to unauthorized bank being used |
Account 6349462035540000 | bankAccounts[].accountNumber, bankAccount.accountNumber or the Pix by Key payerAccount | 2021 Payment rejected due to account mismatch validation failed |
| CNPJ key | dictKey of Create a withdrawal by key | the withdrawal fails with 2002 |
Amount above 25000000 | any amount | 2018 at creation |
| Withdrawal above the available balance | Create a withdrawal by key, Create a manual withdrawal | 2050 at creation |
| Same amount and same receiver on the same day | withdrawals | 1001 at creation |
Participant 5439f937-165c-4213-ac50-b10ebe6cb9f9 ("Banco Fora do Ar") | Pix Direct and Biometric Pix | 4133 at creation |
By product
| Product | What the test CPFs do |
|---|---|
| Classic Pix | The deposit ends failed with the code from the table; with isClosedLoop, an approved deposit goes to reviewing |
| Withdrawals | The withdrawal ends failed with the code of the CPF in taxId (or of the CPF key) |
| Automatic Pix | The immediate charge fails and the recurrence becomes FAILED |
| Biometric Pix | Enrollment validation answers 4131; payments and journeys end failed |
| Pix Direct | The payment ends failed; refusing at the bank gives 4448 and letting it expire gives 4447 |
| Pix by Key | 2020 and 2021 (or an account not registered for the CPF, including a player with no accounts) go to reviewing; the other codes, failed |
| Smart PIX | The journey ends failed; limits of 100000 per payment (4104) and 500000 in total (4134) |
| Pay and Play | The payment fails; a CPF in blocked-users gives 4202 |
Face Match
| CPF or action | Outcome |
|---|---|
123.456.789-09 | success |
111.444.777-35 | rejected, 4203 CPF Rejected on the facial recognition |
CPF failing KYC (table above, except 2020 and 2023) | rejected, 4202 |
| The player gives up on the selfie | failed, 4303 inconclusive face match |
| Nobody acts within 1 hour | expired |
KYC
KYC lookups require the terms to be accepted for the CPF (Accept terms and conditions); without it, 6000. Get basic data returns the status from the table (DECEASED_HOLDER shows as DECEASED; REGULAR_EXPIRED, PEP and SANCTIONS show as REGULAR). The compliance lookup ends REPROVED for PEP, SANCTIONS and NOT_FOUND; the other asynchronous lookups end APPROVED. See Face Match and KYC.
Controlled chaos
Each product has its own failure settings, in the console ("Caos controlado" tab) or at PUT https://api.mimicr.dev/v1/okto/chaos/{key}:
| Key | Product | Codes allowed in opsFailCode |
|---|---|---|
deposit | Deposits (classic Pix) | 4202, 2020, 2021, 2023, 2011 |
withdraw | Withdrawals | 2006, 2007, 2008, 2050, 2011 |
by_key | Pix by Key | 4202, 2011, 2023 |
direct | Pix Direct | 4450, 4449, 4448, 4447, 4401 |
automatic | Automatic Pix | 4450, 4501, 4202, 4401 |
biometric | Biometric Pix | 4136, 4130, 4134, 4119, 4122 |
smart | Smart PIX | 4450, 4134, 4202, 4401 |
pay_and_play | Pay and Play 2.0 | 4202, 2020, 2011 |
kyc | KYC | none (API errors, latency and notifications only) |
face_match | Face Match | 4203, 4303 |
curl --request PUT \
--url https://api.mimicr.dev/v1/okto/chaos/deposit \
--header 'Authorization: Bearer mk_...' \
--header 'Content-Type: application/json' \
--data '{ "enabled": true, "opsFailRate": 100, "opsFailCode": 2011, "webhookFailRate": 50 }'With opsFailRate: 100, every deposit that would be paid ends failed with 2011. API errors answer 500, 503 or 429 with Okto's envelope (code 1000) and the X-Mimicr-Chaos header. mock-* endpoints are never affected, and neither are the shared routes (/operator, /transactions/status, GET /transactions). The fields are in Sandbox control.
Remember to turn chaos off at the end of the test: {"enabled": false}.