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

# Create a Sub-Merchant

> Create a new sub-merchant to customize the name displayed during payments

# Create a Sub-Merchant

Create a sub-merchant to display a custom commercial name to the payer during transactions.

## Endpoint

```bash theme={null}
POST /api/v1/sub-merchant
```

## Headers

| Name          | Type   | Required | Description           |
| ------------- | ------ | -------- | --------------------- |
| Authorization | string | Yes      | Bearer YOUR\_API\_KEY |
| Content-Type  | string | Yes      | application/json      |

## Request Body

```json theme={null}
{
  "name": "My Store",
  "commercialName": "My Store SN",
  "countries": ["SN", "CI"],
  "description": "Online store",
  "legalName": "My Store SARL",
  "businessActivity": "E-commerce",
  "managerName": "John Doe",
  "websiteURL": "https://mystore.com",
  "phoneNumber": "+221771234567",
  "city": "Dakar",
  "address": "123 Commerce Street",
  "zipcode": "12000"
}
```

### Parameters

| Parameter        | Type      | Required | Description                                          |
| ---------------- | --------- | -------- | ---------------------------------------------------- |
| name             | string    | Yes      | Internal name (visible only in your dashboard)       |
| commercialName   | string    | Yes      | Name displayed to the payer on the payment screen    |
| countries        | string\[] | Yes      | Active countries: `SN`, `CI`, `CM`, `BJ`, `BF`, `GN` |
| description      | string    | No       | Free description                                     |
| legalName        | string    | No       | Legal company name                                   |
| businessActivity | string    | No       | Business activity                                    |
| managerName      | string    | No       | Manager name                                         |
| websiteURL       | string    | No       | Website URL                                          |
| phoneNumber      | string    | No       | Phone number                                         |
| city             | string    | No       | City                                                 |
| address          | string    | No       | Full address                                         |
| zipcode          | string    | No       | Zip code                                             |

## Success Response (201)

```json theme={null}
{
  "success": true,
  "message": "Sub-merchant created successfully",
  "data": {
    "subMerchantId": "sm-7f4a9940c621",
    "name": "My Store",
    "commercialName": "My Store SN",
    "countries": ["SN", "CI"],
    "isActive": true,
    "isDefault": false,
    "CREATED_AT": "2026-03-15T03:47:32.000Z"
  }
}
```

<Note>
  Use the returned `subMerchantId` in your transactions via the `sub_merchant_id` field.
</Note>
