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

# Create Merchant

> Create a new merchant for platform/marketplace calculations

Creates a new merchant for platform/marketplace calculations. Merchants represent sellers on your platform.

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token authentication. Example: `Bearer sk_test_xxx`
</ParamField>

<ParamField header="X-API-Version" type="string" required>
  Must be `2026-03-01` for merchant endpoints.
</ParamField>

## Request Body

<ParamField body="reference_merchant_id" type="string">
  Your external ID for this merchant. Must be unique per client and testmode. You can use this ID to look up merchants later.
</ParamField>

<ParamField body="name" type="string">
  The merchant's business name.
</ParamField>

<ParamField body="email" type="string">
  The merchant's email address.
</ParamField>

<ParamField body="default_address" type="object">
  The merchant's default business address. Used as the origin address in platform calculations if not overridden.

  <Expandable title="Address Properties">
    <ParamField body="address_line_1" type="string" required>
      Street address line 1.
    </ParamField>

    <ParamField body="address_line_2" type="string">
      Street address line 2 (optional).
    </ParamField>

    <ParamField body="address_city" type="string" required>
      City name.
    </ParamField>

    <ParamField body="address_province" type="string" required>
      State/province code (2-letter ISO 3166-2).
    </ParamField>

    <ParamField body="address_postal_code" type="string" required>
      Postal/ZIP code.
    </ParamField>

    <ParamField body="address_country" type="string" required>
      Country code (2-letter ISO 3166-1).
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="tax_ids" type="array">
  Array of tax identification numbers for this merchant.

  <Expandable title="Tax ID Object">
    <ParamField body="type" type="string" required>
      The type of tax ID. See [Tax IDs](/essentials/tax-ids) for the full list of supported types.
    </ParamField>

    <ParamField body="value" type="string" required>
      The tax ID value.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="metadata" type="object">
  Arbitrary key-value pairs for storing additional information (max 50 keys).
</ParamField>

## Response

<ResponseField name="id" type="string">
  The internal merchant ID (e.g., `merch_1765503753979c37c5f24`).
</ResponseField>

<ResponseField name="object" type="string">
  Always `tax.merchant`.
</ResponseField>

<ResponseField name="reference_merchant_id" type="string">
  Your external ID for this merchant.
</ResponseField>

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

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

<ResponseField name="default_address" type="object">
  The merchant's default business address.
</ResponseField>

<ResponseField name="tax_ids" type="array">
  Array of tax IDs.
</ResponseField>

<ResponseField name="status" type="string">
  Either `active` or `deleted`.
</ResponseField>

<ResponseField name="testmode" type="boolean">
  Whether this merchant was created in test mode.
</ResponseField>

<ResponseField name="created_at" type="number">
  Unix timestamp of creation.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.numeralhq.com/tax/merchants \
    -H "Authorization: Bearer sk_test_xxx" \
    -H "X-API-Version: 2026-03-01" \
    -H "Content-Type: application/json" \
    -d '{
      "reference_merchant_id": "my-seller-123",
      "name": "Test Seller",
      "email": "seller@example.com",
      "default_address": {
        "address_line_1": "123 Main St",
        "address_city": "San Francisco",
        "address_province": "CA",
        "address_postal_code": "94105",
        "address_country": "US"
      }
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.numeralhq.com/tax/merchants', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer sk_test_xxx',
      'X-API-Version': '2026-03-01',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      reference_merchant_id: 'my-seller-123',
      name: 'Test Seller',
      email: 'seller@example.com',
      default_address: {
        address_line_1: '123 Main St',
        address_city: 'San Francisco',
        address_province: 'CA',
        address_postal_code: '94105',
        address_country: 'US'
      }
    })
  });
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.numeralhq.com/tax/merchants',
      headers={
          'Authorization': 'Bearer sk_test_xxx',
          'X-API-Version': '2026-03-01',
          'Content-Type': 'application/json'
      },
      json={
          'reference_merchant_id': 'my-seller-123',
          'name': 'Test Seller',
          'email': 'seller@example.com',
          'default_address': {
              'address_line_1': '123 Main St',
              'address_city': 'San Francisco',
              'address_province': 'CA',
              'address_postal_code': '94105',
              'address_country': 'US'
          }
      }
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "id": "merch_1765503753979c37c5f24",
    "object": "tax.merchant",
    "reference_merchant_id": "my-seller-123",
    "name": "Test Seller",
    "email": "seller@example.com",
    "default_address": {
      "address_line_1": "123 Main St",
      "address_city": "San Francisco",
      "address_province": "CA",
      "address_postal_code": "94105",
      "address_country": "US"
    },
    "tax_ids": [],
    "status": "active",
    "testmode": true,
    "created_at": 1735689600
  }
  ```

  ```json 400 - Duplicate Reference ID theme={null}
  {
    "error": {
      "error_code": "duplicate_reference_id",
      "error_message": "A merchant with this reference_merchant_id already exists"
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml POST /tax/merchants
openapi: 3.0.1
info:
  title: Numeral API
  description: >-
    API for sales tax calculations - Version 2026-01-01. This version introduces
    Merchant management and Platform Calculations for marketplace and payment
    processor scenarios.
  license:
    name: MIT
  version: '2026-01-01'
servers:
  - url: https://api.numeralhq.com/
security:
  - bearerAuth: []
paths:
  /tax/merchants:
    post:
      summary: Create Merchant
      description: >-
        Creates a new merchant for platform/marketplace calculations. Merchants
        represent sellers on your platform.
      operationId: createMerchant_v20260101
      parameters:
        - name: X-API-Version
          in: header
          required: true
          schema:
            type: string
            enum:
              - '2026-01-01'
          description: API version. Must be 2026-01-01 for merchant endpoints.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MerchantRequest'
            examples:
              basic:
                summary: Basic merchant creation
                value:
                  reference_merchant_id: my-seller-123
                  name: Test Seller
                  email: seller@example.com
                  default_address:
                    address_line_1: 123 Main St
                    address_city: San Francisco
                    address_province: CA
                    address_postal_code: '94105'
                    address_country: US
              with_tax_ids:
                summary: Merchant with tax IDs
                value:
                  reference_merchant_id: eu-seller-456
                  name: European Seller
                  email: eu-seller@example.com
                  default_address:
                    address_line_1: 10 Rue de Commerce
                    address_city: Paris
                    address_province: '75'
                    address_postal_code: '75001'
                    address_country: FR
                  tax_ids:
                    - type: fr_vat
                      value: FR123456789
                    - type: de_vat
                      value: DE123456789
        required: true
      responses:
        '200':
          description: Merchant created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MerchantResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                duplicate_reference_id:
                  summary: Duplicate reference_merchant_id
                  value:
                    error:
                      error_code: duplicate_reference_id
                      error_message: >-
                        A merchant with this reference_merchant_id already
                        exists
components:
  schemas:
    MerchantRequest:
      type: object
      description: Request body for creating a merchant
      properties:
        reference_merchant_id:
          type: string
          description: >-
            Your external ID for this merchant. Must be unique per
            client+testmode.
          example: my-seller-123
        name:
          type: string
          description: The merchant's business name
          example: Acme Seller Co
        email:
          type: string
          description: The merchant's email address
          example: seller@example.com
        default_address:
          $ref: '#/components/schemas/MerchantAddress'
        tax_ids:
          type: array
          description: Tax identification numbers for this merchant
          items:
            $ref: '#/components/schemas/TaxId'
        metadata:
          $ref: '#/components/schemas/Metadata'
    MerchantResponse:
      type: object
      properties:
        id:
          type: string
          description: The internal merchant ID
          example: merch_1765503753979c37c5f24
        object:
          type: string
          example: tax.merchant
        reference_merchant_id:
          type: string
          description: Your external ID for this merchant
          example: my-seller-123
        name:
          type: string
          example: Acme Seller Co
        email:
          type: string
          example: seller@example.com
        default_address:
          $ref: '#/components/schemas/MerchantAddress'
        tax_ids:
          type: array
          items:
            $ref: '#/components/schemas/TaxId'
        status:
          type: string
          enum:
            - active
            - deleted
          example: active
        testmode:
          type: boolean
          description: Whether this merchant was created in test mode
        created_at:
          type: number
          description: Unix timestamp of creation
        updated_at:
          type: number
          description: Unix timestamp of last update
        metadata:
          $ref: '#/components/schemas/Metadata'
    Error:
      type: object
      description: Standard error response format for API version 2026-01-01
      properties:
        code:
          type: integer
          description: HTTP status code
          example: 400
        type:
          type: string
          description: Machine-readable error type
          example: MISSING_FIELD
        message:
          type: string
          description: Human-readable error message
          example: Required field 'address_country' is missing
      required:
        - code
        - type
        - message
    MerchantAddress:
      type: object
      description: >-
        Merchant's default business address. Uses address_ prefix for field
        names.
      properties:
        address_line_1:
          type: string
          example: 123 Main St
        address_line_2:
          type: string
          example: Suite 100
        address_city:
          type: string
          example: San Francisco
        address_province:
          type: string
          description: State/province code (2-letter ISO 3166-2)
          example: CA
        address_postal_code:
          type: string
          example: '94105'
        address_country:
          type: string
          description: Country code (2-letter ISO 3166-1)
          example: US
      required:
        - address_line_1
        - address_city
        - address_province
        - address_postal_code
        - address_country
    TaxId:
      type: object
      properties:
        type:
          type: string
          description: >-
            Stripe-style tax ID type. See [Tax IDs](/essentials/tax-ids) for the
            full list of supported types.
          example: us_ein
        value:
          type: string
          description: The tax ID value
          example: 12-3456789
      required:
        - type
        - value
    Metadata:
      type: object
      description: >-
        You can store arbitrary keys and values in the metadata. Any valid JSON
        object whose values are less than 255 characters long is accepted.
      properties:
        example_key:
          type: string
          description: >-
            Storing things like an order number may be useful for reporting and
            reconciliation.
          example: example_value
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````