Split

A Split is a transaction that will distribute the values from a source account to N destination accounts, as informed by the user, in a given currency.

The source account must have, as long as its available balance type, a pending balance type to perform this transaction.

Parameters

The user must inform the parameters:

Parameter
Description

transaction_type

The type of the transaction, as mapped in the Execution Rules

currency

The currency of the transaction

amount

The main amount of the transaction

source_account_id

The source account ID of the amount to be split

source_balance_validation

Type of validation to be performed on the balance of the source account (see table below)

settled_at

The date for the transaction to be accounted in further reports. If this parameter is not informed, the system will consider the date when the transaction was created.

external_id

User value set for later conciliation

Balance Validation

Balances are validated using the reserved words:

Value
Description

positive

The system will not allow balances to go below zero during transactions

negative

The system will not allow balances to go above zero during transactions

no_validation

The system will not validate balances during transactions

List of destinations

The user must enter a list of destinations (account IDs) and the desired values ​​for each. The system will validate whether the sum of the destination values ​​is equal to that entered in the main source value.

Creating a split

The POST /split method must be used to perform a split.

Example of split creation:

POST /split

{
  "transaction_type": "payment",
  "currency": "brl",
  "amount": 1000,
  "source_account_id": "2874d9c5-e919-8715-b3eb-4ee3440a2fe3",
  "source_balance_validation": "positive",
  "settled_at": "2023-06-01",
  "external_id": "our id 1234",
  "destinations": [
    {
      "account_id": "6bcb1802-f55b-4289-9c23-24a626457d2b",
      "amount": 800
    },
    {
      "account_id": "9d9e085a-14ba-4a11-8a6d-039b0a692c27",
      "amount": 200
    }  
  ],
  "metadata": {
    "key": "value"  
  }
}

Response Example:

{
  "id": "96296a5c-0cf4-4025-dbc4-1a53f0a3afc6"
}

Last updated