Create Customer

Create and store customer records tied to their merchant accounts.

The Create a Customer endpoint allows merchants to create and store customer records tied to their merchant accounts. This is essential for enabling streamlined future transactions without requiring repeated customer registration. Each customer created is assigned a unique identifier (customer_id) using a universally unique identifier (UUID).


Key Features

  • Create Customer Profiles: Store customer details such as name, email, and company.
  • UUID Assignment: Automatically assigns a unique customer_id for use in subsequent API calls.
  • Optional Address Data: Supports ISO 3 code for address_country, which will be sent to the processing gateway if provided.
  • Custom Fields: Add customer-specific custom fields to capture additional customer data unique to your business needs.
  • Data Validation: Requires at least one of the following fields to create a record: firstname, lastname, email, or company.

Usage Notes

Required Fields

At least one of the following fields must be provided to successfully create a customer record:

  • firstname (string): Customer's first name.
  • lastname (string): Customer's last name.
  • email (string): Customer's email address.
  • company (string): Company name associated with the customer.

Optional Fields

  • address_country (string): The ISO 3 code for the customer's country. This will be sent to the processing gateway if provided. Example: USA for the United States.
  • options (object): Additional configuration options including custom fields specific to your customers record.

Custom Fields with Options Parameter

The options parameter allows you to add custom fields that are specific to your customers record. These custom fields can capture additional customer information that's unique to your business requirements.


Response Structure

CodeResponseDescription
201SuccessCustomer successfully created. Returns the customer_id and data.
400Bad RequestMissing or invalid required fields.
401UnauthorizedAPI key invalid or missing.
500Internal Server ErrorAn unexpected error occurred.

Important Considerations

Field Validation: Ensure at least one required field (firstname, lastname, email, company) is present in the payload.

Duplicate Customers: Creating a customer with duplicate details (e.g., email) will generate a new customer record with a unique customer_id. It does not merge existing records.

Country Code Format: If using address_country, confirm it matches the ISO 3 standard to avoid validation errors.

Custom Field Values: Custom field values are always stored as strings regardless of the specified type. The type field indicates how the value should be interpreted and validated.

Customer-Specific Custom Fields: Custom fields are unique to your customers record. You can create fields that capture data specific to your business needs without affecting other customer records.

Future Transactions: The customer_id can be used for associating payment methods, transactions, or invoices with this customer.


Best Practices

  • Use meaningful and unique data for customer identification (e.g., email or company).
  • Keep customer information updated by utilizing the Update a Customer endpoint.
  • For secure operations, always verify the API key and ensure your implementation complies with PCI DSS standards.
Language
Credentials
OAuth2
Click Try It! to start a request and see the response here!