Create a Profile for a Customer

POST /customervault/v1/profiles

A profile contains basic information about your customer, such as their unique identifier, their locale (language), and their name and contact information.

To create a profile you must make a POST request to the profiles endpoint containing the customer's ID and locale; optionally, you can also include their card details, bank account details, or a single-use payment token representing these details (which expires after 15 minutes) and receive a permanent, re-usable payment token in the response. The example below describes the basic POST request and response.

View the API Reference document for details on the multiple additional ways you can create a profile, including using a credit card, a bank account, or a single-use token.

Before trying the example, you should:

  • Provide a unique merchant customer ID number for each profile you create.
  • Replace the API key (after the -u) with the API key you have received.

Before using a card or single-use payment token to create a profile, you should verify that it is valid using the Card Payments API. Verifying a single-use token does not use it up.

Request Example
curl -X POST \
-u devcentre322:B-qa2-0-53625f86-302c021476f52bdc9deab7aea876bb28762e62f92fc6712d0214736abf501e9675e55940e83ef77f5c304edc7968 \
-H 'Content-Type: application/json' \
-d ' {
  "locale" : "en_US",
  "firstName" : "John",
  "lastName" : "Smith",
  "phone" : "713-444-5555",
  "email" : "",
  "cellPhone" : "713-444-5556"
Value Required? Type Description
card object

Required only when a card or single-use payment token is being used to create a profile.

The card details or the single-use payment token.

cellPhone string The customer's cell phone number.
dateOfBirth complex The customer's date of birth.
email string The customer's email address.
firstName string The customer's first name.
gender enum

The customer's gender:

  • F
  • M
ip string The customer's IP address.
lastName string The customer's last name.
locale Yes enum

The language of the profile:

  • en_US
  • fr_CA
  • en_GB
merchantCustomerId Yes string The ID that the merchant provides with the request for their own internal customer identification. This value must be unique for each customer belonging to a merchant.
middleName string The customer's middle name.
nationality string The customer's nationality.
phone string The customer's phone number.
Response Example
  "id" : "716adb4f-6b85-4089-ba9c-d9c0eb649cd7",
  "status" : "ACTIVE",
  "merchantCustomerId" : "mycustomer1",
  "locale" : "en_US",
  "firstName" : "John",
  "lastName" : "Smith",
  "phone" : "713-444-5555",
  "cellPhone" : "713-444-5556"
  "email" : "",
  "paymentToken" : "PyhYo1nGKUfWOPj"

The response contains all the profile details submitted in the request, and the new profile's unique ID. Make a note of the ID to use later for updating the profile and linking address, card, and bank details. The response-specific values are shown below.

Value Type Description
id string The profile identifier.
paymentToken string A token representing the customer. This is not a usable payment token.
status enum

The status of the profile request:


The paymentToken in the response above cannot be used for making payments. Only a paymentToken inside a cards object is a valid, permanent token (or inside a bankAccounts object when including banking information for creating a profile).

See the API Reference section for the full list of profile operations.

Did you find this page useful?