Skip to main content
PATCH
/
api
/
canary
/
customers
/
{id}
Update Customer
curl --request PATCH \
  --url https://api.cashful.africa/api/canary/customers/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {
    "orderId": "12345",
    "customField": "value"
  }
}
'
{
  "id": "customer_789",
  "merchantId": "merchant_456",
  "phoneNumber": "+27821234567",
  "email": "john.doe@example.com",
  "name": "John Doe",
  "metadata": {
    "source": "web",
    "referralCode": "FRIEND123"
  },
  "createdAt": "2025-01-15T10:30:00.000Z",
  "updatedAt": "2025-01-15T10:30:00.000Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The unique identifier of the customer

Body

application/json

Customer update details

metadata
object
required

Optional custom metadata

Example:
{
"orderId": "12345",
"customField": "value"
}
email
string

The email address of the customer

name
string

The full name of the customer

Response

Customer updated successfully

id
string
required

Unique identifier

createdAt
string<date-time>
required
updatedAt
string<date-time>
required
merchantId
string
required
phoneNumber
string
required

The phone number of the customer

metadata
object
required
Example:
{ "customField": "value" }
deletedAt
string<date-time>
email
string
name
string