Creating a Customer

Customers are used as a way to collect information on returning visitors. Once a customer is created you can manage their address, contacts, payment history, stored cards, and notes.

When creating a new customer, only a first and last name is required. If you have any customer specific custom fields that are set as required those too will need to be provided.

Other fields that are available but optional:

  • Type (person or business)
  • Status (active or inactive)
  • Spend profile
  • Tax ID
  • Tax Exempt
  • Customer Number
  • Promotions (opt in or opt out)

Custom Fields

If you have any custom fields defined, those can also be sent in when creating a new customer. Custom fields allow you to capture additional information about a customer. These fields are given custom names, field entry type, and if it's required or not. You will need to create your "customFields" before they can be applied to a specific Customer.
Field types available are as follows:

  • Text
  • Toggle
  • Number
  • Decimal
  • List

Creating Custom fields

To create a customField, send a POST request to the following endpoint:
https://sandbox.api.mxmerchant.com/checkout/v3/field?merchantId={{MerchantId}}
You may also retrieve the customFields you have created for your customers by sending a GET request to the same endpoint.

{
    "fieldName": "CustomFieldText",
    "fieldDataType": "String",
    "fieldSourceType": "Customer",
    "isSystem": false,
    "isRequired":true,
    "name": "CustomFieldText"
}
{
    "fieldName": "CustomFieldBool",
    "fieldDataType": "Boolean",
    "fieldSourceType": "Customer",
    "isSystem": false,
    "isRequired": true,
    "name": "CustomFieldBool"
}
{
    "fieldName": "CustomFieldNum",
    "fieldDataType": "Integer",
    "fieldSourceType": "Customer",
    "isSystem": false,
    "isRequired": true,
    "name": "CustomFieldNum"
}
{
    "fieldName": "CustomField",
    "fieldDataType": "Decimal",
    "fieldSourceType": "Customer",
    "isSystem": false,
    "isRequired": true,
    "name": "CustomField"
}
{
    "fieldName": "CustomFieldList",
    "fieldDataType": "List",
    "fieldSourceType": "Customer",
    "isSystem": false,
    "isRequired": true,
    "isDeleted": false,
    "options": [
        {
            "name": "list",
            "value": "list"
        },
        {
            "name": "value",
            "value": "value"
        },
        {
            "name": "comma",
            "value": "comma"
        },
        {
            "name": "bread",
            "value": "bread"
        }
    ],
    "name": "CustomFieldList"
}

📘

Custom Fields

Please note: customFields must be created against your merchant account before they may be applied to a specific customer.