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

# List Submerchant Markups

> List the submerchants of a merchant with their own markup configuration.

# List Submerchant Markups

Use this endpoint to list the submerchants of a merchant, together with the markup configured for each one.

Submerchants that do not have their own markup are also returned, with `has_markup: false` and empty `payin` and `payout` lists. These submerchants use the merchant's [global markup](/api-reference/markup/account/list-merchant-markups).

## Path Parameters

<ParamField path="merchantId" type="integer" required>
  ID of the merchant (parent account). It must be one of the authenticated user's companies.
</ParamField>

## Query Parameters

<ParamField query="search" type="string">
  Free-text filter. Matches the submerchant's name or legal name (partial match), ID (exact match), or document. When searching by document, punctuation is ignored, so `12.345.678/0001-90` and `12345678000190` are the same.

  Max length: `255`
</ParamField>

<ParamField query="page" type="integer" default="1">
  Page number. Must be greater than or equal to `1`.
</ParamField>

<ParamField query="per_page" type="integer" default="10">
  Number of submerchants per page. Must be between `1` and `500`.
</ParamField>

## Request Examples

<CodeGroup>
  ```bash cURL - List submerchants theme={null}
  curl -X GET "https://api.sandbox.wepayout.com.br/v2/account/123/submerchants/markups?page=1&per_page=25" \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Accept: application/json"
  ```

  ```bash cURL - Search by document theme={null}
  curl -X GET "https://api.sandbox.wepayout.com.br/v2/account/123/submerchants/markups?search=12.345.678/0001-90" \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Accept: application/json"
  ```
</CodeGroup>

## Response

<ResponseField name="data" type="array[object]">
  List of submerchants.

  <Expandable title="Submerchant Object">
    <ResponseField name="id" type="integer">
      Submerchant ID.
    </ResponseField>

    <ResponseField name="name" type="string">
      Submerchant name.
    </ResponseField>

    <ResponseField name="legal_name" type="string or null">
      Submerchant legal name.
    </ResponseField>

    <ResponseField name="document" type="string or null">
      Submerchant document (CNPJ or CPF), digits only.
    </ResponseField>

    <ResponseField name="has_markup" type="boolean">
      `true` when the submerchant has its own markup for at least one product and payment method. When `false`, the global markup is applied.
    </ResponseField>

    <ResponseField name="payin" type="array[object]">
      Markups configured for `payin`, sorted by payment method. Empty when there is none.

      <Expandable title="Markup Object">
        <ResponseField name="id" type="integer">
          Markup configuration ID.
        </ResponseField>

        <ResponseField name="payment_method" type="string">
          Payment method. Values: `pix`, `billet`, `credit_card`.
        </ResponseField>

        <ResponseField name="mode" type="string">
          Markup mode. Values: `fixed`, `percent`.
        </ResponseField>

        <ResponseField name="amount" type="string">
          Markup value, with 2 decimal places. In BRL when `mode` is `fixed`, and a percentage when `mode` is `percent` (`"1.50"` means 1.5%).
        </ResponseField>

        <ResponseField name="min_charge_value" type="string or null">
          Minimum markup amount in BRL when `mode` is `percent`. `null` when `mode` is `fixed`.
        </ResponseField>

        <ResponseField name="max_charge_value" type="string or null">
          Maximum markup amount in BRL when `mode` is `percent`. `null` when `mode` is `fixed`.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="payout" type="array[object]">
      Markups configured for `payout`, with the same structure as `payin`. Payment method values: `pix`, `ted`.
    </ResponseField>

    <ResponseField name="updated_at" type="string or null">
      Date and time (`Y-m-d H:i:s`, America/Sao\_Paulo) of the most recent change to the submerchant's markup. `null` when there is no markup.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="total" type="integer">
  Total number of submerchants that match the filter.
</ResponseField>

<ResponseField name="page" type="integer">
  Current page.
</ResponseField>

<ResponseField name="per_page" type="integer">
  Number of submerchants per page.
</ResponseField>

<ResponseField name="total_pages" type="integer">
  Total number of pages.
</ResponseField>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": [
      {
        "id": 1234,
        "name": "Store X",
        "legal_name": "Store X LTDA",
        "document": "12345678000190",
        "has_markup": true,
        "payin": [
          {
            "id": 55,
            "payment_method": "pix",
            "mode": "percent",
            "amount": "1.40",
            "min_charge_value": "1.00",
            "max_charge_value": "5.00"
          }
        ],
        "payout": [],
        "updated_at": "2026-09-28 10:49:13"
      },
      {
        "id": 1235,
        "name": "Store Y",
        "legal_name": "Store Y LTDA",
        "document": "98765432000110",
        "has_markup": false,
        "payin": [],
        "payout": [],
        "updated_at": null
      }
    ],
    "total": 110,
    "page": 1,
    "per_page": 10,
    "total_pages": 11
  }
  ```

  ```json 422 Unprocessable Entity theme={null}
  {
    "message": "The given data was invalid.",
    "errors": {
      "per_page": [
        "The per page field must not be greater than 500."
      ]
    }
  }
  ```

  ```json 422 Unprocessable Entity - Unauthorized merchant theme={null}
  {
    "message": "The given data was invalid.",
    "errors": {
      "merchantId": [
        "Unauthorized to perform this action."
      ]
    }
  }
  ```

  ```json 500 Internal Server Error theme={null}
  {
    "error": "Failed to list subaccounts."
  }
  ```
</ResponseExample>

## Related Resources

<CardGroup cols={2}>
  <Card title="Get Submerchant Markup" icon="magnifying-glass" href="/api-reference/markup/submerchant/get-submerchant-markup">
    View the markup of a single submerchant
  </Card>

  <Card title="Configure Submerchant Markup" icon="pen" href="/api-reference/markup/submerchant/upsert-submerchant-markup">
    Set the markup of a submerchant
  </Card>

  <Card title="Batch Apply Submerchant Markup" icon="layer-group" href="/api-reference/markup/submerchant/batch-apply-submerchant-markup">
    Apply the same markup to many submerchants
  </Card>

  <Card title="About Markup" icon="circle-info" href="/markup/about-markup">
    Learn about markup types and configuration levels
  </Card>
</CardGroup>
