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

## Path Parameters

**merchantId** `integer` *required*

ID of the merchant (parent account). It must be one of the authenticated user's companies.

**subMerchantId** `integer` *required*

ID of the submerchant. It must be a submerchant of `merchantId`.

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

**message** `string`

Confirmation message.

**deleted** `integer`

Number of markup configurations removed.

```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."
}
```

## Related Resources

> [card] [Configure Submerchant Markup](https://docs.wepayout.co/api-reference/markup/submerchant/upsert-submerchant-markup.md)
>
> Set the markup of a submerchant

> [card] [List Merchant Markups](https://docs.wepayout.co/api-reference/markup/account/list-merchant-markups.md)
>
> View the global markup


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.