Update a customer
Change a customer's details or note, or block them from paying.
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
idstring RequiredThe customer's ID, such ascst_gWFWcc7Ga0Pv7LSC.
Body
namestringUp to 80 characters.emailstringUnique among your customers.notestringFor your team, up to 500 characters.blockedbooleantruestops the customer from paying you.
Errors
- 400
invalid_requestA field is missing, unknown or out of range.fieldnames it. - 404
not_foundNo customer with that ID belongs to your business. - 409
customer_existsAnother customer already has this email.
Any request can also fail on its key or its body. See errors.
Request
curl -X PATCH "https://api.402pay.co/api/v1/customers/cst_gWFWcc7Ga0Pv7LSC" \
-H "Authorization: Bearer $PAY402_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"note": "Prefers USDC on Solana."
}'const response = await fetch("https://api.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 Solana."
}),
});
const { data } = await response.json();import os
import requests
response = requests.patch(
"https://api.402pay.co/api/v1/customers/cst_gWFWcc7Ga0Pv7LSC",
headers={
"Authorization": f"Bearer {os.environ['PAY402_SECRET_KEY']}",
},
json={
"note": "Prefers USDC on Solana."
},
)
data = response.json()["data"]Response200 OK
{
"data": {
"id": "cst_gWFWcc7Ga0Pv7LSC",
"kind": "customer",
"name": "Harper Wilson",
"email": "[email protected]",
"blocked": false,
"note": "Prefers USDC on Solana.",
"stats": {
"payments_count": 2,
"incomplete_count": 2,
"volume": {
"amount": "228.10",
"currency": "USD"
},
"average": {
"amount": "114.05",
"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"
}
}