> ## 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.

# List customers with pagination and filtering (v2)

> Retrieves a paginated list of customers for the authenticated merchant with optional filtering by email, phone number, and active status.



## OpenAPI

````yaml /api-reference/orchestrator-openapi.json get /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:
    get:
      tags:
        - Customer V2
      summary: List customers with pagination and filtering (v2)
      description: >-
        Retrieves a paginated list of customers for the authenticated merchant
        with optional filtering by email, phone number, and active status.
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          description: Number of customers to return per page (max 100)
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
          description: Page number (1-indexed)
        - name: email
          in: query
          schema:
            type: string
            format: email
          description: Filter by customer email address
        - name: phoneNumber
          in: query
          schema:
            type: string
          description: Filter by customer phone number
        - name: email__contains
          in: query
          schema:
            type: string
          description: >-
            Filter customers by partial email match (case-insensitive). Example:
            ?email__contains=example will match all emails containing 'example'.
        - name: active
          in: query
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
              - '1'
              - '0'
          description: Filter by customer active status (true/false or 1/0)
      responses:
        '200':
          description: Customers retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerV2ListResponse'
        '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:
    CustomerV2ListResponse:
      type: object
      required:
        - data
        - pagination
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CustomerV2Response'
          description: List of customers
        pagination:
          type: object
          properties:
            total:
              type: integer
              description: Total number of customers matching the filter
              example: 150
            limit:
              type: integer
              description: Number of customers per page
              example: 20
            page:
              type: integer
              description: Current page number (1-indexed)
              example: 1
            hasMore:
              type: boolean
              description: Whether there are more customers available
              example: true
      example:
        data:
          - id: 123e4567-e89b-12d3-a456-426614174000
            firstName: John
            lastName: Doe
            email: john.doe@example.com
            phoneNumber: '+1234567890'
            active: true
            createdAt: '2025-01-15T10:00:00.000Z'
            updatedAt: '2025-01-15T10:00:00.000Z'
        pagination:
          total: 150
          limit: 20
          page: 1
          hasMore: true
    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
    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'
    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)

````