Create a customer
Creates a new saved customer resource which you can later manipulate and save payment instruments to.
- application/json
Request Body
Details of the customer.
- customer_id string required
Unique ID of the customer.
personal_details object
Personal details for the customer.
address object
Account's personal address information.
city stringCity name from the address.
country string requiredTwo letter country code formatted according to ISO3166-1 alpha-2.
line1 stringFirst line of the address with details of the street name and number.
line2 stringSecond line of the address with details of the building, unit, apartment, and floor numbers.
postal_code stringPostal code from the address.
state stringState name or abbreviation from the address.
birthdate dateDate of birth of the customer.
email stringEmail address of the customer.
first_name stringFirst name of the customer.
last_name stringLast name of the customer.
phone stringPhone number of the customer.
- 201
- 401
- 403
- 409
Created
- application/json
- Schema
- Example (from schema)
Schema
- customer_id string
Unique ID of the customer.
personal_details object
Personal details for the customer.
address object
Account's personal address information.
city stringCity name from the address.
country stringTwo letter country code formatted according to ISO3166-1 alpha-2.
line1 stringFirst line of the address with details of the street name and number.
line2 stringSecond line of the address with details of the building, unit, apartment, and floor numbers.
postal_code stringPostal code from the address.
state stringState name or abbreviation from the address.
birthdate dateDate of birth of the customer.
email stringEmail address of the customer.
first_name stringFirst name of the customer.
last_name stringLast name of the customer.
phone stringPhone number of the customer.
{
"customer_id": "string",
"personal_details": {
"address": {
"city": "string",
"country": "string",
"line1": "string",
"line2": "string",
"postal_code": "string",
"state": "string"
},
"birthdate": "2023-09-21",
"email": "string",
"first_name": "string",
"last_name": "string",
"phone": "string"
}
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Invalid_ Token
- Missing_ Token
- Not_ Authorized_ Token
Schema
- error_code string
Platform code for the error.
- message string
Short description of the error.
{
"error_code": "string",
"message": "string"
}
{
"error_code": "NOT_AUTHORIZED",
"error_message": "invalid access token"
}
{
"error_code": "NOT_AUTHORIZED",
"message": "access token required"
}
{
"error_code": "NOT_AUTHORIZED",
"error_message": "NOT_AUTHORIZED"
}
Forbidden
- application/json
- Schema
- Example (from schema)
- Forbidden
Schema
- error_code string
Platform code for the error.
- error_message string
Short description of the error.
- status_code string
HTTP status code for the error.
{
"error_code": "string",
"error_message": "string",
"status_code": "string"
}
{
"error_code": "FORBIDDEN",
"error_message": "request_not_allowed",
"status_code": "403"
}
Conflict
- application/json
- Schema
- Example (from schema)
- Existing_ Customer
Schema
- error_code string
Platform code for the error.
- message string
Short description of the error.
{
"error_code": "string",
"message": "string"
}
{
"error_code": "CUSTOMER_ALREADY_EXISTS",
"message": "Customer already exists"
}