Skip to main content
PATCH
/
v1
/
customers
/
{customerId}
Update a customer
curl --request PATCH \
  --url https://api.yuvexpay.com/v1/customers/{customerId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "email": "jsmith@example.com",
  "document": "<string>",
  "phone": "<string>",
  "isActive": true,
  "metadata": {}
}
'
{
  "customer": {
    "customerId": "<string>",
    "name": "<string>",
    "email": "<string>",
    "document": "<string>",
    "phone": "<string>",
    "externalId": "<string>",
    "isActive": true,
    "createdAt": "2023-11-07T05:31:56Z"
  },
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

YuvexPay API key. Include as Authorization: Bearer ypk_<env>_<kid>_<secret> where <env> is test (sandbox) or live (production). Create and manage keys in the dashboard under Settings > API Keys.

Path Parameters

customerId
string
required

The customer's prefixed identifier (e.g., cus_ab12cd34ef). This is the merchant-facing slug, not the internal UUID.

Body

application/json
name
string
Required string length: 1 - 200
email
string<email>
Maximum string length: 255
document
string
Maximum string length: 20
documentType
enum<string>
Available options:
CPF,
CNPJ
phone
string
Maximum string length: 20
isActive
boolean
metadata
object

Response

Customer updated.

customer
object
message
string