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

# Get a customers



## OpenAPI

````yaml get /customers/{id}
openapi: 3.0.0
info:
  title: Customer API
  version: v1
servers:
  - url: https://sandbox-api.fedapay.com/v1
  - url: https://api.fedapay.com/v1
security: []
paths:
  /customers/{id}:
    get:
      summary: Get a customers
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
          description: Customer ID.
      responses:
        '200':
          description: Customer retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    description: Customer ID.
                  firstname:
                    type: string
                    description: Customer's first name.
                  lastname:
                    type: string
                    description: Customer's last name.
                  full_name:
                    type: string
                    description: Customer's full name.
                  email:
                    type: string
                    format: email
                    description: Customer's email address.
                  account_id:
                    type: integer
                    description: ID of the customer's account.
                  phone_number_id:
                    type: integer
                    description: ID of the customer's phone number.
                  created_at:
                    type: string
                    format: date-time
                    description: Date and time of customer creation.
                  updated_at:
                    type: string
                    format: date-time
                    description: Date and time of last customer update.
                  deleted_at:
                    type: string
                    format: date-time
                    description: Date and time of customer deletion (if applicable).
        '401':
          description: Unauthorized. Provide a valid secret key.
        '404':
          description: Customer not found.
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          label: NodeJs
          source: >-
            const { FedaPay, Customer } = require('fedapay');

            /* Replace YOUR_SECRETE_API_KEY with your real API key */

            FedaPay.setApiKey("YOUR_SECRETE_API_KEY");

            /* Specify whether you want to run your query in test or live mode
            */

            FedaPay.setEnvironment('sandbox'); //or setEnvironment('live');

            /* Afficher le client */

            const customer = await Customer.retrieve( ID, params = {}, headers =
            {} );
        - lang: PHP
          source: |-
            \FedaPay\Fedapay::setApiKey(MY_API_KEY);
            /**
            * @var \FedaPay\FedaPayObject
            */
            $response = \FedaPay\Customer::retrieve(ID);
            $customers = $response->customers;
            $meta = $response->meta;
        - lang: Ruby
          source: |-
            require 'fedapay';
            # configure FedaPay library
            FedaPay.api_key = '' # Your secret api key
            FedaPay.environment = '' # sandbox or live
            customers = FedaPay::Customer.retrieve(ID);
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````