> For the complete index of the 402pay docs, see [llms.txt](https://developer.402pay.co/llms.txt).

# Update a customer

Change a customer's details or note, or block them from paying.

`PATCH https://dash.402pay.co/api/v1/customers/{id}`

Send only what changes. A blocked customer can't start a checkout until you unblock them, and you receive `customer.blocked` or `customer.unblocked`.

### Path

- `id` (string, required): The customer's ID, such as `cst_gWFWcc7Ga0Pv7LSC`.

### Body

- `name` (string): Up to 80 characters.
- `email` (string): Unique among your customers.
- `note` (string): For your team, up to 500 characters.
- `blocked` (boolean): `true` stops the customer from paying you.

### Errors

- 400 `invalid_request` A field is missing, unknown or out of range. `field` names it.
- 404 `not_found` No customer with that ID belongs to your business.
- 403 `test_mode_unavailable` A test key sent `blocked` on a live business. Use a live key to block or unblock a customer.
- 409 `customer_exists` Another customer already has this email.

Any request can also fail on its key or its body. See [errors](https://developer.402pay.co/api/errors.md).

Request, cURL:

```bash
curl -X PATCH "https://dash.402pay.co/api/v1/customers/cst_gWFWcc7Ga0Pv7LSC" \
  -H "Authorization: Bearer $PAY402_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "note": "Prefers USDC on Polygon."
  }'
```

Request, Node.js:

```js
const response = await fetch("https://dash.402pay.co/api/v1/customers/cst_gWFWcc7Ga0Pv7LSC", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.PAY402_SECRET_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    note: "Prefers USDC on Polygon."
  }),
});
const { data } = await response.json();
```

Request, Python:

```python
import os

import requests

response = requests.patch(
    "https://dash.402pay.co/api/v1/customers/cst_gWFWcc7Ga0Pv7LSC",
    headers={
        "Authorization": f"Bearer {os.environ['PAY402_SECRET_KEY']}",
    },
    json={
        "note": "Prefers USDC on Polygon."
    },
)
data = response.json()["data"]
```

Response, 200 OK:

```json
{
  "data": {
    "id": "cst_gWFWcc7Ga0Pv7LSC",
    "kind": "customer",
    "name": "Harper Wilson",
    "email": "harper.wilson@example.com",
    "blocked": false,
    "note": "Prefers USDC on Polygon.",
    "stats": {
      "payments_count": 2,
      "incomplete_count": 2,
      "volume": {
        "amount": 22810,
        "currency": "USD"
      },
      "average": {
        "amount": 11405,
        "currency": "USD"
      },
      "last_payment_at": "2026-09-26T21:22:47.082Z",
      "preferred_rail": "crypto"
    },
    "created_at": "2026-09-26T21:01:16.809Z",
    "updated_at": "2026-09-26T21:23:16.989Z"
  }
}
```
