Guides
Withdrawals (DICT key and manual)
Pay the player by Pix key or bank details, follow the duplicate and balance rules and receive the Transfer notification.
There are two ways to pay a player: by Pix key (Create a withdrawal by key) or with the bank account (Create a manual withdrawal). Both come out of the operator balance, answer only {externalId, status, created} and report the outcome to the withdrawUrl.
Withdrawal by key
curl --request POST \
--url https://okto.mimicr.dev/transactions/withdraw \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"dictKey": "617.750.603-81",
"externalId": "saque-2001",
"amount": 1500
}'{
"externalId": "saque-2001",
"status": "created",
"created": "2026-10-21T19:09:05.467000+00:00"
}Keep the externalId: it's how you look the withdrawal up with Get transaction status (type: "withdraw").
Key types
dictKey | Example | taxId |
|---|---|---|
| CPF | 617.750.603-81 | Optional; the key itself is the CPF |
ana@exemplo.com.br | Required (2001 without it) | |
| E.164 phone | +5511988887777 | Required (2001 without it) |
| Random (EVP) | 8695ed70-4a64-4eeb-8787-d0badafdc7d5 | Optional |
| CNPJ | 44.783.669/0001-72 | Accepted on creation, but the withdrawal ends failed with 2002 |
A key in any other format answers 400 with 2002.
Manual withdrawal
curl --request POST \
--url https://okto.mimicr.dev/transactions/withdraw/manual \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Ana Ribeiro",
"taxId": "604.184.437-34",
"externalId": "saque-3001",
"amount": 1000,
"bankAccount": {
"bankCode": "18236120",
"branchCode": "1",
"accountType": "checking",
"accountNumber": "12345678"
}
}'bankAccount follows these rules, all with error 2022:
| Field | Rule |
|---|---|
bankCode | Bank ISPB, up to 8 digits |
accountNumber | Up to 20 digits |
accountType | Required: checking, salary, savings or payment |
branchCode | Up to 4 digits; required except for payment accounts |
name (2009) and a taxId with a valid CPF (2001) are required too.
Common rules
| Rule | Error |
|---|---|
externalId required, URL-safe, up to 100 characters | 2010 |
externalId already used by another withdrawal (any date) | 1001 |
| Same amount to the same receiver today, with another withdrawal not failed | 1001 |
amount integer in cents, above zero, up to 25000000 | 2003, 2018 |
amount above the available balance | 2050 |
Undecided withdrawals are reserved: they leave the availableBalance of Get balance (v2) until they finish.
The receiving bank decides
The withdrawal is processed without the player: in the sandbox it stays created for 15 seconds and then settles on its own, success or failed according to the test CPFs, CNPJ keys (2002), the mismatching account 6349462035540000 (2021) and chaos. To force an outcome before that, play the receiving bank in the console or through the control API:
npx mimicr action okto player.step step=withdraw:credit id=<id> npx mimicr action okto player.step step=withdraw:fail id=<id> npx mimicr wait okto delivery transaction_id=<id> event=success
The id is the withdrawal's 16-digit id; find it with List transactions filtering by externalId. withdraw:fail ends with 2006 (receiving bank error). withdraw:credit settles right away, with the same rules as the automatic processing.
| Status | When |
|---|---|
created | Accepted, awaiting the receiving bank (up to 15 seconds) |
success | Credited; transactionInfo carries the endToEndId |
failed | Refused; errorList carries the code |
The notification goes to the withdrawUrl:
{
"Transfer": {
"id": "1486334408408923",
"externalId": "saque-2001",
"amount": 1500,
"originalAmount": 1500,
"status": "success",
"tags": [],
"errorList": []
}
}In Mimicr, the 15-second delay is the simulator's. To test a failure with a regular CPF, use withdraw:fail before the withdrawal settles.
See also Notifications and Errors.