Split in single payments

The only difference between creating a single charge with and without Split is in the submission of the split array in the request for creating a single payment. This array is called split and contains the list of walletId objects and values to be transferred when the charge is received:

{
   ...
   "split":[
      {
         "walletId":"48548710-9baa-4ec1-a11f-9010193527c6",
         "fixedValue":20.00
      },
      {
         "walletId":"0b763922-aa88-4cbe-a567-e3fe8511fa06",
         "percentualValue":10.00
      }
   ]
}

📘

You only need to add Split information for the accounts you want to transfer a portion of the value to. The remaining balance stays entirely in the account that issued the charge.

Update Payment Split

To update the split, simply retrieve the charge ID and use the Update Payment method to perform the update and inform the new split attributes.

{
    ...
    "split":[
        {
            "walletId":"48548710-9baa-4ec1-a11f-9010193527c6",
            "fixedValue":10.00
        }
    ]
}

🚧

Attention

When updating a charge, if you do not want to change the Split settings, do not include the split parameter in the request, because passing null or [] will deactivate the Split.

❗️

Important

If you delete a payment, the split settings will be removed. If the charge is restored and paid, the split will no longer be configured and will not happen. Therefore, if the restored charge had a split configured before deletion, be sure to configure the split again.

Consult Split in Charge

To consult the split settings of a specific payment, you can use the List Payments method or Retrieve a Single Payment.

If the charge has a defined split, the response will bring you the list of charge objects, where you can view the split array at the root of the payment. If the array is not returned, it indicates that the split is not applied to the charge.

The split data applied to the charge will also be sent in the Webhooks triggered by Asaas.