curl --request GET \
--url https://sandbox.hyperswitch.io/v2/customers/list \
--header 'api-key: <api-key>'
[
{
"id": "12345_cus_01926c58bc6e77c09e809964e72af8c8",
"merchant_reference_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"connector_customer_ids": {},
"name": "Jon Test",
"email": "JonTest@test.com",
"phone": "9123456789",
"phone_country_code": "+65",
"description": "First Customer",
"default_billing_address": {
"city": "New York",
"country": "AF",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"default_shipping_address": {
"city": "New York",
"country": "AF",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"created_at": "2023-01-18T11:04:09.922Z",
"metadata": {},
"default_payment_method_id": "12345_pm_01926c58bc6e77c09e809964e72af8c8",
"tax_registration_id": "123456789"
}
]
Lists all the customers for a particular merchant id.
curl --request GET \
--url https://sandbox.hyperswitch.io/v2/customers/list \
--header 'api-key: <api-key>'
[
{
"id": "12345_cus_01926c58bc6e77c09e809964e72af8c8",
"merchant_reference_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"connector_customer_ids": {},
"name": "Jon Test",
"email": "JonTest@test.com",
"phone": "9123456789",
"phone_country_code": "+65",
"description": "First Customer",
"default_billing_address": {
"city": "New York",
"country": "AF",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"default_shipping_address": {
"city": "New York",
"country": "AF",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"created_at": "2023-01-18T11:04:09.922Z",
"metadata": {},
"default_payment_method_id": "12345_pm_01926c58bc6e77c09e809964e72af8c8",
"tax_registration_id": "123456789"
}
]
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.
Customers retrieved
The response is of type object[]
.
Was this page helpful?