Customer Vault
Customers or Customer Vault allows a merchant to store details via a customer rather than a payment vehicle. The Customer can be created through the APIs and and two items are returned. A Customer ID and a Customer Token. The Customer ID is utilized to modify, view, and delete the details within the Customaer Vault. The Customer Token can be used as a payment token within the payment API. It will grab the default payment token associated with the Customer Vault as the actual payment vehicle when the Customer token is used. The customer data is all stored on the secure Exact Payments platform thus reducing PCI scope at the merchant locations. This is an an ideal solution for those merchants that ID their clients by customer ID such as Billing systems, Spa and salon, memberships, etc.
Within the Customer Vault many different items can be stored including multiple shipping adresses (with labels) as well as multiple payment tokens (only tokens can be linked to the Customer Vault). The various shipping addresses can be added at time of creation or any time thereafter. The payments tokens must be added after the fact utilizing the Customer ID.
In order to create a customer the clients should submit a JSON request as follows:
{
"addresses": [
{
"label": "Work",
"city": "Scottsdale",
"country": "United States",
"postalCode": "85251",
"state": "AZ",
"line1": "7272 Indian School Dr",
"isDefault": true
}
],
"name": "John Doe",
"email": "[email protected]",
"phone": "4801111111"
}
'
As mentioned Customer ID can be used to update the details, delete details, view details, or even delete the Customer account once created.
For Example: Once created the various payment tokens can be added. To do so the client should submit a JSON request as follows:
--url https://api.exactpaysandbox.com/customer/62d9be95cb27b92e42c9b0c0/payment-method \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"token": "9fd22452-a8ba-424c-bcce-9deb98f272a0",
"isDefault": true,
"label": "Visa Card"
}
'