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

# Create Merchant

> Creates a new merchant under your company and provisions a dedicated Privy embedded wallet for their funds.

### Headers

<ParamField header="x-api-key" type="string" required>
  Your test or live SDK Secret Key (`sk_test_...` or `sk_live_...`).
</ParamField>

### Request Body

<ParamField body="name" type="string" required>
  The merchant's legal or trade name (minimum 2 characters).
</ParamField>

<ParamField body="email" type="string" required>
  Unique contact email address for the merchant.
</ParamField>

### Response Fields

<ResponseField name="merchant" type="object">
  <Expandable title="Merchant Object">
    <ResponseField name="id" type="string">
      Unique identifier for the created merchant (e.g., `mch_xyz789`).
    </ResponseField>

    <ResponseField name="name" type="string">
      The merchant's name.
    </ResponseField>

    <ResponseField name="email" type="string">
      The merchant's email.
    </ResponseField>

    <ResponseField name="wallet_address" type="string">
      The provisioned USDC wallet address on Base.
    </ResponseField>

    <ResponseField name="privy_user_id" type="string">
      The underlying Privy user ID for the merchant's wallet.
    </ResponseField>

    <ResponseField name="balance" type="string">
      Initial USDC wallet balance (typically `0.00`).
    </ResponseField>

    <ResponseField name="environment" type="string">
      The deployment environment (`test` or `live`).
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp of creation.
    </ResponseField>
  </Expandable>
</ResponseField>

### Response Example

```json theme={null}
{
  "merchant": {
    "id": "mch_xyz789",
    "name": "Urban Eats",
    "email": "ops@urbaneats.com",
    "wallet_address": "0xabcdef1234567890abcdef1234567890abcdef",
    "privy_user_id": "did:privy:ckxyz789...",
    "balance": "0.00",
    "environment": "live",
    "created_at": "2026-03-31T01:15:00Z"
  }
}
```
