API Reference
Withdrawals

Create a withdrawal by key

POST/transactions/withdraw
Base URL: https://okto.mimicr.dev · provider: https://demo-pix.oktopay.eu

Sends a Pix to a DICT key (CPF, e-mail, phone in E.164 or EVP). E-mail and phone keys require taxId. A transfer with the same amount and receiver already requested today answers 1001. The result (success or failed) arrives at withdrawUrl as a Transfer notification.

Okto processes the withdrawal without the player: in Mimicr it settles on its own 15 seconds after creation (KYC test CPFs, CNPJ keys with 2002, the mismatch account with 2021 and chaos fail it). To force an outcome before that, use player.step with withdraw:credit or withdraw:fail.

Authorization

Bearer token in the Authorization: Bearer <token> header. See Authentication.

Body

application/json
dictKeystringrequired

Pix key of the receiver.

Example: "617.750.603-81"
taxIdstring

CPF of the key owner; required for e-mail and phone keys.

Example: "617.750.603-81"
externalIdstringrequired

Your identifier, required, URL-safe and unique (1001).

Example: "saque-2001"
amountintegerrequired

Amount in cents, greater than zero. Must fit in the available balance (2050).

Example: 2500
tagsstring[]

Free tags returned in responses and notifications (up to 5).

addressstring

Receiver address.

postCodestring

Receiver ZIP code.

citystring

Receiver city.

bankAccountsobject[]

Registered accounts of the receiver.

Show child attributes
bankCodestringrequired

ISPB (PSP code) of the bank, up to 8 digits.

Example: "18236120"
branchCodestring

Branch, up to 4 digits. Required in manual withdrawals unless accountType is payment.

Example: "1"
accountTypestring

Account type. Required in manual withdrawals.

checkingsalarysavingspayment
Example: "checking"
accountNumberstringrequired

Account number with check digit, up to 20 digits.

Example: "12345678"

Responses

200Withdrawal created.
externalIdstring

Your identifier.

Example: "saque-2001"
statusstring

Always created: the result arrives at withdrawUrl.

created
createdstring<date-time>

Creation time.

Example: "2026-10-21T19:08:59.710000+00:00"
400Validation or business error. Okto also answers "not found" errors with 400 and an error list.
errorsobject[]required

Errors of the request.

Show child attributes
codeintegerrequired

Okto error code (see the error catalog).

Example: 2001
messagestringrequired

Fixed message of the code.

Example: "The tax id is invalid."
detailedMessagestringrequired

What exactly went wrong.

Example: "taxId must be a valid CPF"
401Invalid access token (code 2000).
errorsobject[]required

Errors of the request.

Show child attributes
codeintegerrequired

Okto error code (see the error catalog).

Example: 2001
messagestringrequired

Fixed message of the code.

Example: "The tax id is invalid."
detailedMessagestringrequired

What exactly went wrong.

Example: "taxId must be a valid CPF"
403Missing Authorization header (code 2000, "Full authentication is required to access this resource").
errorsobject[]required

Errors of the request.

Show child attributes
codeintegerrequired

Okto error code (see the error catalog).

Example: 2001
messagestringrequired

Fixed message of the code.

Example: "The tax id is invalid."
detailedMessagestringrequired

What exactly went wrong.

Example: "taxId must be a valid CPF"