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

# Get Customer

> Get customer details by customer ID



## OpenAPI

````yaml GET /customer/{customerId}
openapi: 3.0.1
info:
  title: xPay API Store
  description: ''
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.xpaycheckout.com
security:
  - basicAuth: []
paths:
  /customer/{customerId}:
    get:
      description: Get customer details by customer ID
      parameters:
        - $ref: '#/components/parameters/CustomerId'
      responses:
        '200':
          description: Customer details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-customer-response'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    CustomerId:
      name: customerId
      in: path
      required: true
      schema:
        type: string
      description: Unique identifier of the customer
  schemas:
    get-customer-response:
      type: object
      properties:
        customerId:
          type: string
          description: Unique identifier for the customer
          example: cus_Tfd3Jq1tZxPjYVhRQW2r3
        customerDetails:
          $ref: '#/components/schemas/BillingDetails'
    Error:
      required:
        - errorCode
        - errorDescription
      type: object
      properties:
        errorCode:
          type: string
          example: bad_request
        errorDescription:
          type: string
          example: Failed to read request
    BillingDetails:
      type: object
      description: Billing details for the customer.
      required:
        - name
        - email
        - contactNumber
      properties:
        name:
          type: string
          description: Customer's name
          example: John Doe
        email:
          type: string
          description: Customer's email address
          example: john.doe@example.com
        contactNumber:
          type: string
          description: >-
            Customer's contact number ([E.164
            format](https://en.wikipedia.org/wiki/E.164)), including the country
            code (e.g., +1 for US, +44 for UK, +91 for India).
          example: '+919123456789'
        customerAddress:
          $ref: '#/components/schemas/CustomerAddress'
    CustomerAddress:
      type: object
      properties:
        addressLine1:
          type: string
          description: Line 1 of the customer's address
          example: 123 Main St
        addressLine2:
          type: string
          description: Line 2 of the customer's address
          example: Apt 1
        city:
          type: string
          description: City of the customer's address
          example: New York
        state:
          type: string
          description: State of the customer's address
          example: NY
        country:
          type: string
          description: >-
            Two-letter country code ([ISO 3166-1
            alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
          example: US
        postalCode:
          type: string
          description: Postal code
          example: '2424'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````