> Index of every page: https://docs.merchantservicedepot.com/llms.txt

# Retrieve customer


`GET /v1/customers/{customer_id}`

The path takes the Myela `cus_…` id only — your own id here is `not_found`; look up by your id with `?externalId=` on List customers. A customer id from another merchant is also `not_found`, never `permission_denied` — confirming existence would leak it.

Auth: a secret key with the `customers.retrieve` permission. Returns `200` with Customer.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `customerId` | path | string | Yes | The customer that owns or receives this resource. |

## Request

**curl**

```curl
curl -X GET "https://payments-api-sandbox.merchantservicedepot.com/v1/customers/{customer_id}" \
  -H "Authorization: Bearer $MYELA_API_KEY"
```

**Node**

```node
const res = await fetch("https://payments-api-sandbox.merchantservicedepot.com/v1/customers/{customer_id}", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MYELA_API_KEY}`,
  },
});

if (!res.ok) {
  const { error } = await res.json();
  // Branch on error.code — never on error.message.
  throw new Error(error.code);
}
const data = await res.json();
```

**Python**

```python
import os
import requests

res = requests.get(
    "https://payments-api-sandbox.merchantservicedepot.com/v1/customers/{customer_id}",
    headers={
        "Authorization": f"Bearer {os.environ['MYELA_API_KEY']}",
    },
)

if not res.ok:
    # Branch on error["code"] — never on error["message"].
    raise RuntimeError(res.json()["error"]["code"])
data = res.json()
```

## Response

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Unique customer identifier. |
| `object` | "customer" | Stable resource discriminator. |
| `email` | string | Customer email. |
| `name` | string | Customer name. |
| `phone` | string | Customer phone. |
| `externalId` | string | Your own id for this customer. Write-once. |
| `customFields` | object[] | Your own typed fields, up to 20 rows of {name, type, value}. Omitted when none are set. Replace-on-write. |
| `createdAt` | string | ISO 8601 creation timestamp. |

```json
{
  "id": "cus_01JEXAMPLE",
  "object": "customer",
  "email": "ada@example.com",
  "name": "Ada Lovelace",
  "phone": "+15555550123",
  "externalId": "acct-8812",
  "customFields": [
    {
      "name": "Plan tier",
      "type": "text",
      "value": "gold"
    },
    {
      "name": "Seats",
      "type": "number",
      "value": "12"
    }
  ],
  "createdAt": "2026-08-10T20:49:51.653Z"
}
```

Source: https://docs.merchantservicedepot.com/api-reference/retrieve-customer/
