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

# Create a new customer (v2)

> Creates a new customer for the authenticated merchant. Does not require an external ID.



## OpenAPI

````yaml /api-reference/orchestrator-openapi.json post /v2/customers
openapi: 3.0.0
info:
  title: Payment Orchestrator API
  description: API documentation for the Payment Orchestrator service
  version: 1.0.0
servers:
  - url: https://api.sandbox.cheqpay.mx/pos
    description: Sandbox environment
  - url: https://prod.cheqpay.mx/pos
    description: Production environment
security:
  - ApiKeyAuth: []
    MerchantIdAuth: []
tags:
  - name: Customer
    description: Customer management endpoints (v1)
  - name: Customer V2
    description: >-
      Customer management endpoints (v2) - merchant-scoped, no external ID
      required
  - name: Payment Order
    description: Payment order management endpoints
  - name: Checkout
    description: Payment checkout endpoints
  - name: Payment Method
    description: Payment method management endpoints
  - name: Subscription Plan
    description: Subscription plan management endpoints for recurring payments
  - name: Subscription
    description: Subscription management endpoints for recurring billing
  - name: Subscription Invoice
    description: Subscription invoice management endpoints
paths:
  /v2/customers:
    post:
      tags:
        - Customer V2
      summary: Create a new customer (v2)
      description: >-
        Creates a new customer for the authenticated merchant. Does not require
        an external ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerV2Create'
      responses:
        '201':
          description: Customer created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerV2Response'
        '400':
          description: Validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
      security: []
components:
  schemas:
    CustomerV2Create:
      type: object
      required:
        - firstName
        - email
      properties:
        firstName:
          type: string
          description: Customer's first name
          example: John
        lastName:
          type: string
          description: Customer's last name
          example: Doe
        email:
          type: string
          format: email
          description: Customer's email address
          example: john.doe@example.com
        phoneNumber:
          type: string
          description: Customer's phone number
          example: '+1234567890'
        displayName:
          type: string
          description: Display name for the customer
          example: Johnny
        accountName:
          type: string
          description: Account name associated with the customer
          example: John Doe's Account
        notes:
          type: string
          description: Free-form notes about the customer
          example: VIP customer
        notificationOptions:
          type: object
          description: Customer notification preferences
          properties:
            notifyEmail:
              type: boolean
              description: Whether the customer wants to receive email notifications
              default: false
            notifyPhone:
              type: boolean
              description: Whether the customer wants to receive phone notifications
              default: false
        taxId:
          type: string
          maxLength: 50
          nullable: true
          description: Customer tax identifier (e.g. RFC)
          example: VTH981105F90
        billingAddress:
          allOf:
            - $ref: '#/components/schemas/CustomerAddress'
          nullable: true
    CustomerV2Response:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique customer identifier
          example: 123e4567-e89b-12d3-a456-426614174000
        merchantId:
          type: string
          format: uuid
          nullable: true
          description: Merchant that owns this customer
          example: 123e4567-e89b-12d3-a456-426614174111
        sourceId:
          type: string
          format: uuid
          nullable: true
          description: >-
            Legacy copy-on-write source customer id (always null for new
            customers)
          example: null
        firstName:
          type: string
          description: Customer's first name
          example: John
        lastName:
          type: string
          description: Customer's last name
          example: Doe
        email:
          type: string
          format: email
          description: Customer's email address
          example: john.doe@example.com
        phoneNumber:
          type: string
          description: Customer's phone number
          example: '+1234567890'
        displayName:
          type: string
          nullable: true
          description: Display name for the customer
          example: Johnny
        accountName:
          type: string
          nullable: true
          description: Account name associated with the customer
          example: John Doe's Account
        notes:
          type: string
          nullable: true
          description: Free-form notes about the customer
          example: VIP customer
        active:
          type: boolean
          description: Whether the customer is active
          example: true
        notificationOptions:
          type: object
          description: Customer notification preferences
          properties:
            notifyEmail:
              type: boolean
              description: Whether the customer wants to receive email notifications
              default: false
            notifyPhone:
              type: boolean
              description: Whether the customer wants to receive phone notifications
              default: false
        createdAt:
          type: string
          format: date-time
          description: Customer creation timestamp
          example: '2025-01-15T10:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          description: Customer last update timestamp
          example: '2025-01-15T10:00:00.000Z'
        taxId:
          type: string
          maxLength: 50
          nullable: true
          description: Customer tax identifier (e.g. RFC)
          example: VTH981105F90
        billingAddress:
          allOf:
            - $ref: '#/components/schemas/CustomerAddress'
          nullable: true
      example:
        id: 123e4567-e89b-12d3-a456-426614174000
        firstName: John
        lastName: Doe
        email: john.doe@example.com
        phoneNumber: '+1234567890'
        displayName: Johnny
        accountName: John Doe's Account
        notes: VIP customer
        active: true
        notificationOptions:
          notifyEmail: true
          notifyPhone: false
        createdAt: '2025-01-15T10:00:00.000Z'
        updatedAt: '2025-01-15T10:00:00.000Z'
    ValidationError:
      type: object
      description: Validation error response
      required:
        - message
        - errors
      properties:
        message:
          type: string
          description: Error message
          example: Validation failed
        errors:
          type: array
          description: List of validation errors
          items:
            type: object
            properties:
              field:
                type: string
                description: Field that failed validation
                example: name
              message:
                type: string
                description: Validation error message
                example: Required
      example:
        message: Validation failed
        errors:
          - field: name
            message: Required
    InternalError:
      type: object
      description: Error response
      properties:
        message:
          type: string
          description: Error message
          example: Error message
      example:
        message: Error message
    CustomerAddress:
      type: object
      required:
        - countryCode
      description: >-
        Billing address managed through the customer endpoints (no standalone
        address CRUD).
      properties:
        line1:
          type: string
          maxLength: 255
          example: Av. Reforma 123
          nullable: true
        line2:
          type: string
          maxLength: 255
          nullable: true
          example: Piso 4
        city:
          type: string
          maxLength: 100
          nullable: true
          example: CDMX
        state:
          type: string
          maxLength: 100
          nullable: true
          example: Ciudad de México
        postalCode:
          type: string
          maxLength: 20
          nullable: true
          example: '06600'
        countryCode:
          type: string
          pattern: ^[A-Za-z]{2}$
          nullable: true
          description: ISO 3166-1 alpha-2 country code
          example: MX
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication (required)
    MerchantIdAuth:
      type: apiKey
      in: header
      name: x-merchant-id
      description: Merchant ID for identifying the merchant (required)

````