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

# Remove Merchant

> Suspend a sub-merchant from your marketplace.

# Remove Merchant

Suspends a sub-merchant from your marketplace. The relationship record is set to `suspended` and the merchant's marketplace assignment is cleared — it is not permanently deleted. A suspended merchant can be reactivated later.

## Path Parameters

<ParamField path="merchantId" type="string" required>
  The business ID of the sub-merchant to suspend.
</ParamField>

## Response

```json theme={null}
{
  "success": true,
  "message": "Merchant removed from marketplace"
}
```

## Behavior

Only merchants with an **active** relationship to your marketplace can be suspended. The following changes happen atomically:

* The `MarketplaceMerchant` record status is set to `suspended`.
* The merchant's portfolio `marketplace_id` and `marketplace_commission_rate` are cleared.

The merchant's Khaime account, products, and transaction history are not affected.

<Note>
  To restore a suspended merchant, use the Reactivate Merchant endpoint. To permanently remove a merchant's data, use the [Delete Merchant](/api-reference/marketplace/delete-merchant) endpoint.
</Note>

## Error Codes

| Status | Error                                                  | Fix                                                                             |
| ------ | ------------------------------------------------------ | ------------------------------------------------------------------------------- |
| `401`  | `Unauthorized`                                         | Provide a valid `X-API-Key` header                                              |
| `403`  | `This endpoint is restricted to marketplace operators` | Your account must have marketplace mode enabled                                 |
| `404`  | `Active merchant relationship not found`               | The merchant is not actively linked to your marketplace or is already suspended |

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://api.khaime.com/api/v1/partner/marketplace/merchants/1676 \
    -H "X-API-Key: pk_live_your_key"
  ```
</RequestExample>
