Update a customer

North America—United States and Canada

Updates an existing customer's profile, including a card associated with the customer.

Prerequisites

Before you update a customer card-on-file profile, complete the following:

  1. Set up a sandbox developer account.
  2. Create an app in the sandbox. See also Ecommerce app permissions.
  3. Create a card token to generate the Clover token(clv_ token) for each payment.
  4. Create a card-on-file customer to generate the customerId.

Steps

  1. Send a PUT request to the /v1/customers/{customerId} endpoint.
  2. Enter values in the following required parameters:
    1. customerId
    2. email
    3. source

Request example

curl --request PUT \
     --url https://scl-sandbox.dev.clover.com/v1/customers/customerId \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer ab86a5e8-48f3-b3bd-8c45-d415e9867833' \
     --header 'Content-Type: application/json' \
     --data '{"ecomind":"ecom"}'

Response example

{
  "id": "T5YMNM7HEW91Y",
  "object": "customer",
  "created": 1659654474478,
  "currency": "USD",
  "email": "[email protected]",
  "phone": "4085555555",
  "name": "John Data",
  "sources": {
    "object": "list",
    "data": [
      "XBFPVYKY9G6SG"
    ]
  },
  "shipping": {
    "name": "Joe Doe",
    "phone": "4085555555"
  }
}