> ## Documentation Index
> Fetch the complete documentation index at: https://api-reference.hyperswitch.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Customers - List

> Lists all the customers for a particular merchant id.



## OpenAPI

````yaml get /v1/customers/list
openapi: 3.0.3
info:
  title: Hyperswitch - API Documentation
  description: >

    ## Get started


    Hyperswitch provides a collection of APIs that enable you to process and
    manage payments.

    Our APIs accept and return JSON in the HTTP body, and return standard HTTP
    response codes.


    You can consume the APIs directly using your favorite HTTP/REST library.


    We have a testing environment referred to "sandbox", which you can setup to
    test API calls without

    affecting production data.

    Currently, our sandbox environment is live while our production environment
    is under development

    and will be available soon.

    You can sign up on our Dashboard to get API keys to access Hyperswitch API.


    ### Environment


    Use the following base URLs when making requests to the APIs:


    | Environment   |  Base URL                          |

    |---------------|------------------------------------|

    | Sandbox       | <https://sandbox.hyperswitch.io>   |

    | Production    | <https://api.hyperswitch.io>       |


    ## Authentication


    When you sign up on our [dashboard](https://app.hyperswitch.io) and create a
    merchant

    account, you are given a secret key (also referred as api-key) and a
    publishable key.

    You may authenticate all API requests with Hyperswitch server by providing
    the appropriate key in

    the request Authorization header.


    | Key             | 
    Description                                                                                 
    |

    |-----------------|-----------------------------------------------------------------------------------------------|

    | api-key         | Private key. Used to authenticate all API requests from
    your merchant server                  |

    | publishable key | Unique identifier for your account. Used to authenticate
    API requests from your app's client  |


    Never share your secret api keys. Keep them guarded and secure.
  contact:
    name: Hyperswitch Support
    url: https://hyperswitch.io
    email: support.global@juspay.io
  license:
    name: Apache-2.0
  version: 0.1.0
servers:
  - url: https://sandbox.hyperswitch.io
    description: Sandbox Environment
security: []
tags:
  - name: Merchant Account
    description: Create and manage merchant accounts
  - name: Profile
    description: Create and manage profiles
  - name: Merchant Connector Account
    description: Create and manage merchant connector accounts
  - name: Payments
    description: Create and manage one-time payments, recurring payments and mandates
  - name: Refunds
    description: Create and manage refunds for successful payments
  - name: Mandates
    description: Manage mandates
  - name: Customers
    description: Create and manage customers
  - name: Payment Methods
    description: Create and manage payment methods of customers
  - name: Disputes
    description: Manage disputes
  - name: API Key
    description: Create and manage API Keys
  - name: Payouts
    description: Create and manage payouts
  - name: payment link
    description: Create payment link
  - name: Routing
    description: Create and manage routing configurations
  - name: Event
    description: Manage events
paths:
  /v1/customers/list:
    get:
      tags:
        - Customers
      summary: Customers - List
      description: Lists all the customers for a particular merchant id.
      operationId: List all Customers for a Merchant
      parameters:
        - name: X-Profile-Id
          in: header
          description: Profile ID associated to the customer
          required: true
          schema:
            type: string
          example: pro_abcdefghijklmnop
      responses:
        '200':
          description: Customers retrieved
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomerResponse'
        '400':
          description: Invalid Data
      security:
        - api_key: []
components:
  schemas:
    CustomerResponse:
      type: object
      required:
        - id
        - merchant_reference_id
        - created_at
      properties:
        id:
          type: string
          description: Unique identifier for the customer
          example: 12345_cus_01926c58bc6e77c09e809964e72af8c8
          maxLength: 64
          minLength: 32
        merchant_reference_id:
          type: string
          description: The identifier for the customer object
          example: cus_y3oqhf46pyzuxjbcn2giaqnb44
          maxLength: 64
          minLength: 1
        connector_customer_ids:
          type: object
          description: Connector specific customer reference ids
          nullable: true
        name:
          type: string
          description: The customer's name
          example: Jon Test
          nullable: true
          maxLength: 255
        email:
          type: string
          description: The customer's email address
          example: JonTest@test.com
          nullable: true
          maxLength: 255
        phone:
          type: string
          description: The customer's phone number
          example: '9123456789'
          nullable: true
          maxLength: 255
        phone_country_code:
          type: string
          description: The country code for the customer phone number
          example: '+65'
          nullable: true
          maxLength: 255
        description:
          type: string
          description: An arbitrary string that you can attach to a customer object.
          example: First Customer
          nullable: true
          maxLength: 255
        default_billing_address:
          allOf:
            - $ref: '#/components/schemas/AddressDetails'
          nullable: true
        default_shipping_address:
          allOf:
            - $ref: '#/components/schemas/AddressDetails'
          nullable: true
        created_at:
          type: string
          format: date-time
          description: >-
            A timestamp (ISO 8601 code) that determines when the customer was
            created
          example: '2023-01-18T11:04:09.922Z'
        metadata:
          type: object
          description: >-
            You can specify up to 50 keys, with key names up to 40 characters
            long and values up to 500

            characters long. Metadata is useful for storing additional,
            structured information on an

            object.
          nullable: true
        default_payment_method_id:
          type: string
          description: The identifier for the default payment method.
          example: 12345_pm_01926c58bc6e77c09e809964e72af8c8
          nullable: true
          maxLength: 64
        tax_registration_id:
          type: string
          description: The customer's tax registration number.
          example: '123456789'
          nullable: true
          maxLength: 255
        document_details:
          allOf:
            - $ref: '#/components/schemas/CustomerDocumentDetails'
          nullable: true
    AddressDetails:
      type: object
      description: Address details
      properties:
        city:
          type: string
          description: The city, district, suburb, town, or village of the address.
          example: New York
          nullable: true
          maxLength: 50
        country:
          allOf:
            - $ref: '#/components/schemas/CountryAlpha2'
          nullable: true
        line1:
          type: string
          description: The first line of the street address or P.O. Box.
          example: 123, King Street
          nullable: true
          maxLength: 200
        line2:
          type: string
          description: >-
            The second line of the street address or P.O. Box (e.g., apartment,
            suite, unit, or building).
          example: Powelson Avenue
          nullable: true
          maxLength: 50
        line3:
          type: string
          description: The third line of the street address, if applicable.
          example: Bridgewater
          nullable: true
          maxLength: 50
        zip:
          type: string
          description: The zip/postal code for the address
          example: '08807'
          nullable: true
          maxLength: 50
        state:
          type: string
          description: The address state
          example: New York
          nullable: true
        first_name:
          type: string
          description: The first name for the address
          example: John
          nullable: true
          maxLength: 255
        last_name:
          type: string
          description: The last name for the address
          example: Doe
          nullable: true
          maxLength: 255
        origin_zip:
          type: string
          description: The zip/postal code of the origin
          example: '08807'
          nullable: true
          maxLength: 50
    CustomerDocumentDetails:
      type: object
      required:
        - document_type
        - document_number
      properties:
        document_type:
          $ref: '#/components/schemas/DocumentKind'
        document_number:
          type: string
          description: |-
            The customer's document number
            Length of the document number depends upon the document_type.
            For CPF/CNPJ it is typically 11/14 digits long
          example: '12345678911'
          maxLength: 255
    CountryAlpha2:
      type: string
      enum:
        - AF
        - AX
        - AL
        - DZ
        - AS
        - AD
        - AO
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - AZ
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BQ
        - BA
        - BW
        - BV
        - BR
        - IO
        - BN
        - BG
        - BF
        - BI
        - KH
        - CM
        - CA
        - CV
        - KY
        - CF
        - TD
        - CL
        - CN
        - CX
        - CC
        - CO
        - KM
        - CG
        - CD
        - CK
        - CR
        - CI
        - HR
        - CU
        - CW
        - CY
        - CZ
        - DK
        - DJ
        - DM
        - DO
        - EC
        - EG
        - SV
        - GQ
        - ER
        - EE
        - ET
        - FK
        - FO
        - FJ
        - FI
        - FR
        - GF
        - PF
        - TF
        - GA
        - GM
        - GE
        - DE
        - GH
        - GI
        - GR
        - GL
        - GD
        - GP
        - GU
        - GT
        - GG
        - GN
        - GW
        - GY
        - HT
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IM
        - IL
        - IT
        - JM
        - JP
        - JE
        - JO
        - KZ
        - KE
        - KI
        - KP
        - KR
        - KW
        - KG
        - LA
        - LV
        - LB
        - LS
        - LR
        - LY
        - LI
        - LT
        - LU
        - MO
        - MK
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - ME
        - MS
        - MA
        - MZ
        - MM
        - NA
        - NR
        - NP
        - NL
        - NC
        - NZ
        - NI
        - NE
        - NG
        - NU
        - NF
        - MP
        - 'NO'
        - OM
        - PK
        - PW
        - PS
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - RE
        - RO
        - RU
        - RW
        - BL
        - SH
        - KN
        - LC
        - MF
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - SN
        - RS
        - SC
        - SL
        - SG
        - SX
        - SK
        - SI
        - SB
        - SO
        - ZA
        - GS
        - SS
        - ES
        - LK
        - SD
        - SR
        - SJ
        - SZ
        - SE
        - CH
        - SY
        - TW
        - TJ
        - TZ
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - UG
        - UA
        - AE
        - GB
        - UM
        - UY
        - UZ
        - VU
        - VE
        - VN
        - VG
        - VI
        - WF
        - EH
        - YE
        - ZM
        - ZW
        - US
    DocumentKind:
      type: string
      description: Represents the type of identification document used for validation.
      enum:
        - cpf
        - cnpj
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Format: `api-key=<api_key>`


        Use the API key created under your merchant account from the HyperSwitch
        dashboard. API key is used to authenticate API requests from your
        merchant server only. Don't expose this key on a website or embed it in
        a mobile application.

````