---
page_source: https://docs.juspay.io/paytm-gateway-configuration/docs/express-checkout/getcustomer
page_title: Get Customer
---

## API Version: default


# Get Customer API



This is a Server-to-Server API which will return customer entity for the given identifier.## Endpoints:
- Production: https://api.juspay.in/customers/{customer_id}

## Request Type: 
GET

## Content-Type: 
application/json

## Authorization:

#### Basic Auth:
Consists of two parts.

* Username: API Key obtained from Juspay dashboard
* Password: Empty string
- Value: <p>Example:- <br> Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==</p>
- Tags: Base64 Encoded username:password, required
## Headers:

#### x-merchantid:
Merchant ID provided by Juspay
- Value: <p>Example:- <br>merchant-id</p>
- Tags: string, required

#### Content-Type:
application/x-www-form-urlencoded
- Tags: String
## Sample Code Snippets:
### Sample Request:

#### Request - Without Client Auth Token Code Snippet:

```request - without client auth token
curl -X GET \
  https://api.juspay.in/customers/:customerid \
  -u your_api_key:  \
  -H 'x-merchantid: merchant_id'\
  -H 'Content-Type: application/x-www-form-urlencoded'\
```

#### Request - With Client Auth Token Code Snippet:

```request - with client auth token
curl -X GET \
  'https://api.juspay.in/customers/:customer_id?options.get_client_auth_token=true' \
-u your_api_key:  \
-H 'x-merchantid: merchant_id'
```

### Sample Response:

#### Without Client Auth Token:
```json
{
   "id": "cst_om2l6ctlptxwxuzj",
   "object": "customer",
   "object_reference_id": "customer@gmail.com",
   "mobile_number": "99887766",
   "date_created": "2016-08-02T08:07:52+0000",
   "last_updated": "2016-08-02T08:07:52+0000",
   "email_address": "customer@gmail.com",
   "first_name": "John",
   "last_name": "Smith",
   "mobile_country_code": "65"
}
```

#### With Client Auth Token:
```json
{
   "object_reference_id": "customer",
   "object": "customer",
   "mobile_number": "99999999",
   "mobile_country_code": "65",
   "last_updated": "2020-03-17T14:29:17Z",
   "last_name": "al",
   "juspay": {
     "client_auth_token_expiry": "2020-03-17T14:45:26Z",
     "client_auth_token": "tkn_8649cd66d30c47728b8dd2fb6279a4cc"
   },
   "id": "cst_tooedar2k7j1d60b",
   "first_name": "name",
   "email_address": "test@juspay.in",
   "date_created": "2020-03-17T14:29:17Z"
 }
```

## Query Parameters:

#### options.get_client_auth_token:
It is used to get the client auth token which is required for SDK integration
- Tags: Boolean
## Body Parameters:
### Basic Parameters:

#### customer_id:
- Description: It is the ID with which merchant refers to a customer object. This id is used to access the stored payment methods, allow EMI transactions and setup subscriptions.
- Value: <p>Example:- <br> customer-id-007 </p>
- Tags: string, required
## API Responses:
### 200:

#### WITHOUT CLIENT_AUTH_TOKEN:
- Value:
  - **Id**:
    - Tags: string
  - **Customer_id**:
    - Description: It is the ID with which merchant refers to a customer object. This id is used to access the stored payment methods, allow EMI transactions and setup subscriptions.
    - Tags: string
  - **Object**:
    - Tags: string
  - **Mobile_number**:
    - Description: Customers mobile number
    - Tags: string
  - **Mobile_country_code**:
    - Description: Cusomter's mobile country code
    - Tags: string
  - **Last_updated**:
    - Tags: string
  - **Last_name**:
    - Description: Customer's last name
    - Tags: string
  - **First_name**:
    - Description: Customer's first name
    - Tags: string
  - **Email_address**:
    - Description: Customer's e-mail address
    - Tags: string
  - **Date_created**:
    - Tags: string
- Tags: JSON

#### WITH CLIENT_AUTH_TOKEN:
- Value:
  - **Id**:
    - Tags: string
  - **Customer_id**:
    - Description: It is the ID with which merchant refers to a customer object. This id is used to access the stored payment methods, allow EMI transactions and setup subscriptions.
    - Tags: string
  - **Object**:
    - Tags: string
  - **Mobile_number**:
    - Description: Customers mobile number
    - Tags: string
  - **Mobile_country_code**:
    - Description: Cusomter's mobile country code
    - Tags: string
  - **Last_updated**:
    - Tags: string
  - **Last_name**:
    - Description: Customer's last name
    - Tags: string
  - **First_name**:
    - Description: Customer's first name
    - Tags: string
  - **Email_address**:
    - Description: Customer's e-mail address
    - Tags: string
  - **Date_created**:
    - Tags: string
  - **Juspay**:
    - Value:
      - **Client_auth_token_expiry**:
        - Tags: string
      - **Client_auth_token**:
        - Tags: string
    - Tags: JSON
- Tags: JSON
### 400:

#### status:
- Description: Bad Request
- Tags: string

#### error_code:
- Description: Details of keys missing
- Value: <p>Example:- <br> Mandatory fields are missing </p>
- Tags: string

#### error_message:
- Description: Further Details of keys missing
- Tags: string
