API ReferenceCustomers
Update a customer
PATCH /v1/customers/{id} : update mutable customer fields.
PATCH /v1/customers/{id}
Headers
| Header | Required | Value |
|---|---|---|
Authorization | yes | Bearer sk_... |
Content-Type | yes | application/json |
Path params
| Param | Type | Notes |
|---|---|---|
id | string | Customer ULID |
Body
| Field | Type | Notes |
|---|---|---|
email | string | New email (unique) |
phone | string | New phone (E.164) |
name | string | Display name |
kyc_status and country_code are not mutable here: KYC transitions through
the verification flow; country is set at onboarding.
Request
curl -X PATCH https://api.ouipay.com/v1/customers/01M2S17... \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{ "email": "new@example.com" }'Response 200
Returns the updated customer object.
Errors
| HTTP | error.code | Cause |
|---|---|---|
| 400 | VALIDATION | Invalid field |
| 404 | NOT_FOUND | No such customer |
| 409 | DUPLICATE | Value in use |