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

# Create an Intent Split

> Create a transfer to the wallet of the seller of an Intent line item.

Once the Intent is `PARTIALLY_CAPTURED` or `CAPTURED`, you can create Splits to set up the transfers to the seller wallet(s).

### Path parameters

<ParamField path="IntentId" type="string" required>
  The unique identifier of the Intent.
</ParamField>

### Body parameters

<ParamField path="Splits" type="array (object)">
  The future Splits to create to transfer Intent funds to the line item sellers.

  <Expandable>
    <ParamField body="LineItemId" type="string" required>
      The unique identifier of the line item.
    </ParamField>

    <ParamField body="SplitAmount" type="type" required>
      The amount to transfer to the seller's `WalledId`.

      The sum of the `SplitAmount` values of all `Splits` must be lower than or equal to the `AvailableAmountToSplit` of the Intent.
    </ParamField>

    <ParamField body="FeesAmount" type="string">
      The amount of fees.

      The sum of the `FeesAmount` values of all `Splits` must be lower than or equal to the `PlatformFeesAmount` of the Intent.
    </ParamField>

    <ParamField body="TransferDate" type="Unix timestamp">
      The future date when the funds are to be automatically transferred to the seller's wallet.
    </ParamField>

    <ParamField body="Description" type="string">
      The description of the Split.
    </ParamField>

    <ParamField body="SplitOriginWalletId" type="string">
      The unique identifier of the wallet from which the split will be debited.

      This parameter is required for Intents where `ExternalProviderName` is `Mangopay`. If it is not defined in the Intent it must be defined at Split creation.
    </ParamField>
  </Expandable>
</ParamField>

### Responses

<AccordionGroup>
  <Accordion title="200 - Response parameters" defaultOpen>
    <ResponseField name="Splits" type="array (object)">
      The Splits requested.

      <Expandable>
        <ResponseField name="Id" type="string">
          The unique identifier of the Split.
        </ResponseField>

        <ResponseField name="LineItemId" type="string">
          The unique identifier of the line item.
        </ResponseField>

        <ResponseField name="SellerId" type="string">
          The unique identifier of the seller of the line item.
        </ResponseField>

        <ResponseField name="WalletId" type="string">
          The unique identifier of the wallet to credit the seller's funds.
        </ResponseField>

        <ResponseField name="SplitAmount" type="type">
          The amount to transfer to the seller's `WalledId`.

          The sum of the `SplitAmount` values of all `Splits` must be lower than or equal to the `AvailableAmountToSplit` of the Intent.
        </ResponseField>

        <ResponseField name="FeesAmount" type="string">
          The amount of fees.

          The sum of the `FeesAmount` values of all `Splits` must be lower than or equal to the `PlatformFeesAmount` of the Intent.
        </ResponseField>

        <ResponseField name="TransferDate" type="Unix timestamp">
          The future date when the funds are to be automatically transferred to the seller's wallet.
        </ResponseField>

        <ResponseField name="Description" type="string">
          The description of the Split.
        </ResponseField>

        <ResponseField name="Status" type="string">
          The status of the Split:

          * `CREATED`
          * `PENDING_FUNDS_RECEPTION`
          * `AVAILABLE`
          * `PENDING`
          * `COMPLETED`
          * `REJECTED`
          * `FAILED`
          * `REVERSED`
          * `REFUND_SPLIT_PENDING`
          * `REFUND_SPLIT_REJECTED`
          * `REFUND_SPLIT_COMPLETED`
        </ResponseField>

        <ResponseField name="SplitOriginWalletId" type="string">
          The unique identifier of the wallet from which the split will be debited.

          This parameter is required for Intents where `ExternalProviderName` is `Mangopay`. If it is not defined in the Intent it must be defined at Split creation.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Accordion>
</AccordionGroup>

<AccordionGroup>
  <Accordion title="400 - Intent must be CAPTURED or PARTIALLY_CAPTURED">
    ```json theme={null}
    {
        "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
        "Id": "fbb4a0c1-4788-404b-85c3-fcdcfc27ed4f",
        "Date": 1770047721,
        "Type": "param_error",
        "Errors": {
            "Status": "Cannot create split: intent must be in CAPTURED or PARTIALLY_CAPTURED state."
        }
    }
    ```
  </Accordion>

  <Accordion title="400 - SplitOriginWalletId for Mangopay ExternalProviderName">
    In a hybrid flow, if the `SplitOriginWalletId` for Intents where `ExternalProviderName` is `Mangopay` is not provided in the Intent, it must be provided in the Split or else the following error is returned:

    ```json theme={null}
    {
        "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
        "Id": "da9d9f6e-6469-44c1-9ed7-231d6a3fe1d1",
        "Date": 1770909760,
        "Type": "param_error",
        "Errors": {
            "Split[0].SplitOriginWalletId": "The field is required."
        }
    }
    ```
  </Accordion>
</AccordionGroup>

<ResponseExample>
  ```json theme={null}
  {
      "Splits": [
          {
              "Id": "int_split_019778c4-29c7-7c62-b7c6-775b744ab9f1",
              "LineItemId": "int_li_019778b4-7e87-7153-8fa0-746b23ecae7d",
              "SellerId": "user_m_01JXWB4GBKZYXHJX197M90JHYV",
              "WalletId": "wlt_m_01JXWB5K56PT3J0HJ8Z9YHCYFR",
              "SplitAmount": 8000,
              "FeesAmount": 0,
              "TransferDate": 1742428800,
              "Description": "Example description of the Split",
              "Status": "CREATED"
          },
          {
              "Id": "int_split_019778c4-29c7-7c62-b7c6-775b744ab9f2",
              "LineItemId": "int_li_019778b4-7e87-7153-8fa0-746b23ecae7e",
              "SellerId": "user_m_01JXWB53KC8ZZFQNC6S34W9CN0",
              "WalletId": "wlt_m_01JXWB5WF962GM9N4GC3VJVK8K",
              "SplitAmount": 2500,
              "FeesAmount": 0,
              "TransferDate": 1742428800,
              "Description": "Example description of the Split",
              "Status": "CREATED"
          }
      ]
  }
  ```
</ResponseExample>

<RequestExample>
  ```json theme={null}
  {
      "Splits" : [
          {
              "LineItemId" : "int_li_019778b4-7e87-7153-8fa0-746b23ecae7d",
              "SplitAmount" : 8000,
              "FeesAmount" : 0,
              "TransferDate" : 1742428800,
              "Description" : "Example description of the Split"
          },
          {
              "LineItemId" : "int_li_019778b4-7e87-7153-8fa0-746b23ecae7e",
              "SplitAmount" : 2500,
              "FeesAmount" : 0,
              "TransferDate" : 1742428800,
              "Description" : "Example description of the Split"
          }
      ]       
  }
  ```
</RequestExample>
