Guides
Pix by Key
The player sends Pix to the operator's wallet key; registered accounts, closed loop review and the pixByKeyDeposit notification.
In Pix by Key there is no charge: the player sends a Pix to the operator's wallet key, from any bank. To know whose money it is, you register each player's bank accounts; a Pix from an unregistered account stays under review until you accept or reject it. Notifications go to the depositUrl.
1. Get the wallet key
curl --url https://okto.mimicr.dev/by-key/wallet-dict-key \ --header 'Authorization: Bearer <token>'
{ "dictKey": "8695ed70-4a64-4eeb-8787-d0badafdc7d5" }Show this key (an EVP) to the player. In Mimicr, each sandbox has a fixed key.
2. Register the player's accounts
curl --request POST \
--url https://okto.mimicr.dev/by-key/payer-bank-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"taxId": "604.184.437-34",
"bankCode": "18236120",
"branchCode": "1",
"accountType": "checking",
"accountNumber": "12345678"
}'{
"id": "5d61ec1f-1a22-412f-92a5-5a92497ead4e",
"bankCode": "18236120",
"branchCode": "1",
"accountType": "checking",
"accountNumber": "12345678",
"taxId": "604.184.437-34"
}| Rule | Error |
|---|---|
taxId with a valid CPF | 2001 |
bankCode up to 8 digits, accountNumber up to 20, branchCode up to 4, accountType in checking, salary, savings, payment | 2022 |
| The same account already registered for the CPF | 1001 |
| More than 3 accounts per CPF | 1000 |
All accounts of a CPF share the same taxIdRegistrationId. Manage them with List payer bank accounts, Update a payer bank account (the taxId must be the same, otherwise 2020) and Delete payer bank accounts, which takes {"id": "…"} for one account or {"taxIdRegistrationId": "…"} for all the player's accounts.
3. The player sends the Pix
In the sandbox, simulate the received Pix in one of these ways:
- Mock a received Pix: states the source account (
payerAccount,payerPsp,payerAgency) and the payer; it also requiresreceiverType,receiverTaxId,receiverAccount,payerAccountTypeandpayerType. - Mock a received Pix (v2): only
dictKey,payerTaxIdandamount; it uses the CPF's first registered account (with no registered account, the Pix goes to review). - The control API:
npx mimicr action okto bykey.receive taxId=604.184.437-34 amount=25.00.
curl --request POST \
--url https://okto.mimicr.dev/by-key/mock/simulate-receiving-by-dict-key-v2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"amount": 15,
"dictKey": "8695ed70-4a64-4eeb-8787-d0badafdc7d5",
"payerTaxId": "617.750.603-81"
}'{ "message": "success", "dtHr": "2026-10-21T19:09:17.429Z", "amount": 15, "dictKey": "8695ed70-4a64-4eeb-8787-d0badafdc7d5" }On both test endpoints, amount is in reais (10.5 = R$ 10.50), not cents. A dictKey other than the wallet key answers 4507.
What happens to the Pix
| Situation | Status |
|---|---|
| Pix from an account registered for the payer CPF | paid |
| Pix from another account, including a player with no registered accounts | reviewing |
CPF 021.449.531-04 (payer CPF differs from the account holder, 2020) | reviewing |
Source account 6349462035540000 (mismatching account, 2021) | reviewing |
| Another CPF rejected by the tests, or chaos | failed, with the code |
Each Pix becomes a deposit with a UUID id and pixKey equal to the wallet key, notified like this:
{
"pixByKeyDeposit": {
"id": "f50a4c4c-7b6e-44d5-948d-01a582950169",
"externalId": "1c12f460-9383-498b-a0ea-ad245423dd87",
"amount": 2100,
"originalAmount": 2100,
"status": "reviewing",
"transactionInfo": { "name": "Ana Ribeiro", "taxId": "604.184.437-34", "endToEndId": "E00416968202610211909Y63xdBJ8oWc" }
}
}4. Decide deposits under review
- Accept a deposit under review:
paid, response"PIX by Key transaction accepted successfully". - Reject a deposit under review:
reversed, the money goes back to the payer andtransactionInfo.refundEndToEndIdis filled.
Outside reviewing, the answer is 400 with 1000. Both decisions send a new notification.
npx mimicr wait okto delivery transaction_id=<deposit-id> event=paid
List deposits returns a page (up to 50 items) with the filters of Queries and pagination, for example status=REVIEWING.
In Mimicr, the review of unregistered accounts and the fixed key per sandbox are the simulator's own choices.