Create a card-on-file customer
North America—United States and Canada
Creates a card-on-file (COF) customer record for e-commerce transactions.
Note
If you do not want to save card data for the customer, use the create a customer in the Platform API.
Prerequisites
Before you create a customer, complete the following:
- Set up a sandbox developer account.
- Create an app in the sandbox. See also Ecommerce app permissions.
- Create a card token to generate the Clover token(clv_ token) for each payment.
Steps
- Send a POST request to the /v1/customers endpoint.
- Enter values in the following required parameters:
email
source
Request example
curl --request POST \
--url https://scl-sandbox.dev.clover.com/v1/customers \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ab86a5e8-48f3-b3bd-8c45-d415e9867833' \
--header 'Content-Type: application/json' \
--data '{"ecomind":"ecom"}'
Response example
{
"id": "SSHHCDEXTF550",
"object": "customer",
"created": 1659650347317,
"currency": "USD",
"email": "[email protected]",
"phone": "4085551858",
"name": "Joe Doe",
"sources": {
"object": "list",
"data": [
"ND2EFTHF8HM34"
]
},
"shipping": {
"name": "Joe Doe",
"phone": "4085551858"
}
}
Updated 1 day ago