Skip to main content
POST
/
v1
/
merchants
/
{merchantId}
/
cashouts
Create a cashout request for a specific merchant
curl --request POST \
  --url https://api-sandbox.rinne.com.br/core/v1/merchants/{merchantId}/cashouts \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "request_id": "req_123456789",
  "origin_bank_account_id": "507f1f77bcf86cd799439011",
  "destination_bank_account_id": "507f1f77bcf86cd799439012",
  "amount": 10000,
  "method": "PIX",
  "currency": "BRL"
}
'
{
  "id": "507f1f77bcf86cd799439011",
  "request_id": "req_123456789",
  "external_request_id": "123e4567-e89b-12d3-a456-426614174000",
  "company_id": "507f1f77bcf86cd799439011",
  "origin_bank_account_id": "507f1f77bcf86cd799439011",
  "destination_bank_account_id": "507f1f77bcf86cd799439012",
  "amount": 10000,
  "currency": "BRL",
  "method": "PIX",
  "status": "PROCESSING",
  "created_at": "2025-01-01T10:00:00.000Z",
  "updated_at": "2025-01-01T10:05:00.000Z",
  "fee": 150,
  "cost": 100,
  "fee_policy_id": "507f1f77bcf86cd799439013",
  "cost_policy_id": "507f1f77bcf86cd799439014",
  "error_message": "Insufficient funds",
  "returned_amount": 5000,
  "latest_return_at": "2025-01-01T11:00:00.000Z",
  "returns": [
    {
      "id": "507f1f77bcf86cd799439015",
      "cashout_id": "507f1f77bcf86cd799439011",
      "provider_return_id": "b94150c9-7dad-4b21-8183-50c83f4c5dd8",
      "amount": 1000,
      "reason": "CUSTOMER_REQUEST",
      "return_identification": "return_123456789",
      "original_end_to_end_id": "E12345678202501011100000000001",
      "original_id": "tx_123456789",
      "created_at": "2025-01-01T11:00:00.000Z",
      "updated_at": "2025-01-01T11:00:00.000Z"
    }
  ]
}

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

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:

"507f1f77bcf86cd799439011"

destination_bank_account_id
string<uuid>
required

ID of the bank account to credit to

Example:

"507f1f77bcf86cd799439012"

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"

currency
enum<string>
default:BRL

Currency code (defaults to BRL if not provided)

Available options:
BRL
Example:

"BRL"

Response

Cashout created successfully

Cashout response

id
string<uuid>
required

Internal cashout ID

Example:

"507f1f77bcf86cd799439011"

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:

"507f1f77bcf86cd799439011"

origin_bank_account_id
string<uuid>
required

ID of the bank account to debit from

Example:

"507f1f77bcf86cd799439011"

destination_bank_account_id
string<uuid>
required

ID of the bank account to credit to

Example:

"507f1f77bcf86cd799439012"

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"

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:

"507f1f77bcf86cd799439013"

cost_policy_id
string<uuid> | null

ID of the cost policy used for pricing this cashout

Example:

"507f1f77bcf86cd799439014"

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