API Test Keys

Fetch All Customers

GET
/v1/customers

Click to copy

Use this endpoint to retrieve the details of all the customers.

Is this page helpful?

Curl

change language

change language

1
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
2
-X GET https://api.razorpay.com/v1/customers?count=2&skip=1

Success

Failure

1
{
2
"entity": "collection",
3
"count": 2,
4
"items": [
5
{
6
"id": "cust_LQPdeJqQeKQrJM",
7
"entity": "customer",
8
"name": "Gaurav Kumar",
9
"email": null,
10
"contact": "+919876543210",
11
"gstin": null,
12
"notes": [],
13
"created_at": 1678580352
14
},
15
{
16
"id": "cust_LQPd9lomgwDE5F",
17
"entity": "customer",
18
"name": "Saurav Kumar",
19
"email": "saurav.kumar@example.com",
20
"contact": "+919876543210",
21
"gstin": null,
22
"notes": [],
23
"created_at": 1678580324
24
}
25
]
26
}
Query Parameters
count
integer

The number of customer records to be retrieved from the system. The default value is 10. The maximum value is 100. This can be used for pagination in combination with skip.

skip
integer

The number of customer records that must be skipped. The default value is 0. This can be used for pagination in combination with count.

Response Parameters
Errors

The API <key/secret> provided is invalid.

Error Status: 4xx

The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons:

  • Different keys for test mode and live modes.
  • Expired API key.

Solution

Fetch All Customers

GET
/v1/customers

Click to copy

Use this endpoint to retrieve the details of all the customers.

Is this page helpful?

Query Parameters
count
integer

The number of customer records to be retrieved from the system. The default value is 10. The maximum value is 100. This can be used for pagination in combination with skip.

skip
integer

The number of customer records that must be skipped. The default value is 0. This can be used for pagination in combination with count.

Response Parameters
Errors

The API <key/secret> provided is invalid.

Error Status: 4xx

The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons:

  • Different keys for test mode and live modes.
  • Expired API key.

Solution

Curl

change language

change language

1
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
2
-X GET https://api.razorpay.com/v1/customers?count=2&skip=1

Success

Failure

1
{
2
"entity": "collection",
3
"count": 2,
4
"items": [
5
{
6
"id": "cust_LQPdeJqQeKQrJM",
7
"entity": "customer",
8
"name": "Gaurav Kumar",
9
"email": null,
10
"contact": "+919876543210",
11
"gstin": null,
12
"notes": [],
13
"created_at": 1678580352
14
},
15
{
16
"id": "cust_LQPd9lomgwDE5F",
17
"entity": "customer",
18
"name": "Saurav Kumar",
19
"email": "saurav.kumar@example.com",
20
"contact": "+919876543210",
21
"gstin": null,
22
"notes": [],
23
"created_at": 1678580324
24
}
25
]
26
}