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

# Get customer by external ID

> Retrieves a customer by their external ID. The external ID is the ID provided by the merchant system.



## OpenAPI

````yaml /api-reference/orchestrator-openapi.json get /customers/{id}
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:
  /customers/{id}:
    get:
      tags:
        - Customer
      summary: Get customer by external ID
      description: >-
        Retrieves a customer by their external ID. The external ID is the ID
        provided by the merchant system.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: External customer ID
      responses:
        '200':
          description: Customer details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: Customer not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
components:
  schemas:
    CustomerResponse:
      type: object
      properties:
        externalId:
          type: string
          description: External customer ID from merchant system
          example: CUST-123
        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'
        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: '2024-03-20T10:00:00Z'
        updatedAt:
          type: string
          format: date-time
          description: Customer last update timestamp
          example: '2024-03-20T10:00:00Z'
      example:
        externalId: CUST-123
        firstName: John
        lastName: Doe
        email: john.doe@example.com
        phoneNumber: '+1234567890'
        active: true
        createdAt: '2024-03-20T10:00:00Z'
        updatedAt: '2024-03-20T10:00:00Z'
    UnauthorizedError:
      type: object
      description: Unauthorized error response
      properties:
        message:
          type: string
          description: Error message
          example: Invalid api key
      example:
        message: Invalid api key
    NotFoundError:
      type: object
      description: Not found error response
      properties:
        message:
          type: string
          description: Error message
          example: Merchant not found
      example:
        message: Merchant not found
    InternalError:
      type: object
      description: Error response
      properties:
        message:
          type: string
          description: Error message
          example: Error message
      example:
        message: Error message
  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)

````