> ## Documentation Index
> Fetch the complete documentation index at: https://docs.en.amplopay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Split through the API

> How to split payments between producers

## Splitting payments with splits

In payment routes, such as `Receive Pix`, `Receive Card`, and `Receive Boleto`, you can include an optional field called `splits` to automatically split the transaction amount between different accounts.

```json theme={null}
{
  "splits": [
    {
      "producerId": "cm1234",
      "amount": 30.0
    },
    {
      "producerId": "cm9876",
      "amount": 20.0
    }
  ]
}
```

## How it works

The `splits` field must be an array of objects. Each object represents a portion of the sale that will be sent to another producer.

Each split object must contain:

* `producerId`: ID of the account that will receive the split. The receiver should copy their own ID from the profile settings page and send it to the account creating the split.
* `amount`: amount in BRL that will be transferred to that account.

The sum of all `amount` values inside `splits` cannot exceed the total transaction amount.

If you do not send `splits`, 100% of the amount is assigned to the main account creating the payment.
