POST
/
customers
/
{id}
Update a customer
curl --request POST \
  --url https://pay.chargily.net/test/api/v2/customers/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "email": "<string>",
  "phone": "<string>",
  "address": {
    "country": "<string>",
    "state": "<string>",
    "address": "<string>"
  },
  "metadata": {}
}'
{
   "id": "01hj0p5s3ygy2mx1czg2wzcc4x",
   "entity": "customer",
   "livemode": false,
   "name": "Hocine Saad",
   "email": null,
   "phone": null,
   "address": {
      "country": "Algeria",
      "state": "Tizi-Ouzou",
      "address": "123 Main Street"
   },
   "metadata": null,
   "created_at": 1702977791,
   "updated_at": 1702977791
}

Path parameters

id
string
The ID of the customer.

Body parameters

name
string
The name of the customer.
email
string
The email of the customer.
phone
string
The phone number of the customer.
address
object
The address of the customer
metadata
key-value array
A Set of key-value pairs that can be used to store additional information about the customer.

Returns

If the request is successful, it returns a customer object with the updated information.
{
   "id": "01hj0p5s3ygy2mx1czg2wzcc4x",
   "entity": "customer",
   "livemode": false,
   "name": "Hocine Saad",
   "email": null,
   "phone": null,
   "address": {
      "country": "Algeria",
      "state": "Tizi-Ouzou",
      "address": "123 Main Street"
   },
   "metadata": null,
   "created_at": 1702977791,
   "updated_at": 1702977791
}