Skip to main content
POST
Create a cashout request for a specific merchant

Authorizations

x-api-key
string
header
required

Company API key for authentication

Path Parameters

merchantId
string
required

The merchant ID

Body

application/json

Schema for creating a new cashout request.

Exactly one of destination_bank_account_id or destination_pix_key_id must be provided.

request_id
string
required

Client-generated request ID for tracking

Example:

"req_123456789"

origin_bank_account_id
string<uuid>
required

ID of the bank account to debit from

Example:

"123e4567-e89b-12d3-a456-426614174000"

amount
integer
required

Amount to transfer in cents

Required range: x >= 1
Example:

10000

method
enum<string>
required

Cashout method

Available options:
PIX
Example:

"PIX"

destination_bank_account_id
string<uuid>

ID of the bank account to credit to (omit when using destination_pix_key_id)

Example:

"123e4567-e89b-12d3-a456-426614174001"

destination_pix_key_id
string<uuid>

ID of the company PIX key to pay to (omit when using destination_bank_account_id)

Example:

"223e4567-e89b-12d3-a456-426614174002"

currency
enum<string>
default:BRL

Currency code (defaults to BRL if not provided)

Available options:
BRL
Example:

"BRL"

metadata
object

Optional metadata object for storing custom key-value pairs

Example:

Response

Cashout created successfully

Cashout response

id
string<uuid>
required

Internal cashout ID

Example:

"123e4567-e89b-12d3-a456-426614174000"

request_id
string
required

Client-generated request ID

Example:

"req_123456789"

external_request_id
string<uuid>
required

External provider request ID

Example:

"123e4567-e89b-12d3-a456-426614174000"

company_id
string<uuid>
required

Company ID

Example:

"123e4567-e89b-12d3-a456-426614174000"

origin_bank_account_id
string<uuid>
required

ID of the bank account to debit from

Example:

"123e4567-e89b-12d3-a456-426614174000"

amount
integer
required

Amount to transfer in cents

Example:

10000

currency
enum<string>
required

Currency code

Available options:
BRL
Example:

"BRL"

method
enum<string>
required

Cashout method

Available options:
PIX
Example:

"PIX"

status
enum<string>
required

Cashout status

Available options:
PENDING,
PROCESSING,
COMPLETED,
PARTIALLY_RETURNED,
RETURNED,
FAILED
Example:

"PROCESSING"

created_at
string<date-time>
required

Creation timestamp

Example:

"2025-01-01T10:00:00.000Z"

updated_at
string<date-time>
required

Last update timestamp

Example:

"2025-01-01T10:05:00.000Z"

destination_bank_account_id
string<uuid> | null

ID of the bank account to credit to (null when destination is a PIX key)

Example:

"123e4567-e89b-12d3-a456-426614174001"

destination_pix_key_id
string<uuid> | null

ID of the company PIX key paid to (null when destination is a bank account)

Example:

"223e4567-e89b-12d3-a456-426614174002"

fee
integer

Total fee in cents charged on the cashout

Example:

150

cost
integer

Total cost in cents for this cashout

Example:

100

fee_policy_id
string<uuid> | null

ID of the fee policy used for pricing this cashout

Example:

"123e4567-e89b-12d3-a456-426614174002"

cost_policy_id
string<uuid> | null

ID of the cost policy used for pricing this cashout

Example:

"123e4567-e89b-12d3-a456-426614174003"

error_message
string | null

Error message if cashout failed

Example:

"Insufficient funds"

returned_amount
integer | null

Total amount returned in cents (sum of all returns)

Example:

5000

latest_return_at
string<date-time> | null

Timestamp of the latest return

Example:

"2025-01-01T11:00:00.000Z"

returns
object[]

List of returns

metadata
object | null

Metadata object for storing custom key-value pairs

Example:
end_to_end_id
string | null

End to End ID from the payment provider (PIX transaction identifier)

Example:

"E12345678202501271234567890123456"