> ## 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.

# Remove Submerchant Markup

> Remove the markup configuration of a submerchant.

# Remove Submerchant Markup

Use this endpoint to remove all of a submerchant's own markup configurations, for every product and payment method.

<Note>
  After the removal, the submerchant's transactions use the merchant's **global markup** again. An inline `markup` sent in the request still takes priority.
</Note>

## 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>

<ParamField path="subMerchantId" type="integer" required>
  ID of the submerchant. It must be a submerchant of `merchantId`.
</ParamField>

## Request Example

```bash cURL theme={null}
curl -X DELETE "https://api.sandbox.wepayout.com.br/v2/account/123/submerchants/1234/markups" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Accept: application/json"
```

## Response

<ResponseField name="message" type="string">
  Confirmation message.
</ResponseField>

<ResponseField name="deleted" type="integer">
  Number of markup configurations removed.
</ResponseField>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "message": "Markup removed successfully.",
    "deleted": 3
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "message": "Markup not found."
  }
  ```

  ```json 422 Unprocessable Entity - Not a submerchant of this merchant theme={null}
  {
    "message": "The given data was invalid.",
    "errors": {
      "subMerchantId": [
        "The subaccount 7777 does not belong to this account."
      ]
    }
  }
  ```

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

## Related Resources

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

  <Card title="List Merchant Markups" icon="list" href="/api-reference/markup/account/list-merchant-markups">
    View the global markup
  </Card>
</CardGroup>
