# Creates a customer

<span class="api-endpoint">POST {{<a href="#urlbases">baseURL</a>}}/pay-api/v1/customers</span>
This endpoint creates a customer.
The return field `id` is the customerId, also referred to as the *customer identifier*.
Use this value to specify this customer in other endpoints.
<span class="api-seealso">See Also:</span><br>
To search for a customer, see `GET /pay-api/v1/customers`<br>
To find a customer by identifier, see `GET /pay-api/v1/customers/{{customerId}}`.<br>
To update a customer's information, see `PUT /pay-api/v1/customers/{{customerId}}`.

Endpoint: POST /pay-api/v1/customers
Version: V1
Security: Bearer

## Request fields (application/json):

  - `firstName` (string, required)
    Specifies the customer's first name.

Example: Alexandro
    Example: Alexandro

  - `lastName` (string, required)
    Indicates the customer's last name.

Example: Peppared
    Example: Peppared

  - `companyName` (string)
    Specifies the name of the customer's company or organization.

Example: Peppared Street Cafe
    Example: Peppared Street Cafe

  - `email` (string)
    Indicates the customer's email.
Example: peppared@example.com
    Example: peppared@example.com

  - `mobilePhoneNumber` (string)
    Indicates the customer's mobile phone number.
Example: +14155552309
    Example: +14155552309

  - `isMobileNumberSmsNotificationsEnabled` (boolean)
    Indicates the customer's SMS notification is enabled.
If `true`, the customer's SMS notification is enabled.
If `false`, the customer's SMS notification is not enabled.
If missing or omitted, the information is not available.
Example: true

  - `useBillingAsShippingAddress` (boolean)
    Indicates to use the billing address as the shipping address.
If `true`, use the billing address as the shipping address.
If `false`, do not use the billing address as the shipping address.
Instead, use the field `shippingAddress`.
Example: true
    Example: true

  - `billingAddress` (object)

  - `billingAddress.addressLine1` (string)
    Specifies the street address.

Example: 322 Unicorn Boulevard
    Example: 322 Unicorn Boulevard

  - `billingAddress.addressLine2` (string)
    Specifies additional street address information.

Example: Office 3
    Example: Office 3

  - `billingAddress.city` (string)
    Specifies the name of the city.

Example: Chicago
    Example: Chicago

  - `billingAddress.zip` (string)
    Specifies the postal or ZIP code.
Examples:
60612
60612-0001
    Example: 60612

  - `billingAddress.stateName` (string)
    Indicates the full state name.
Examples:
Texas
Washington
Illinois
    Example: Illinois

  - `billingAddress.stateId` (integer)
    Specifies the Flute US state or territory identifier code.
Example: 4
    Example: 4

  - `billingAddress.countryId` (integer)
    Specifies the Flute country identifier.
Example: 1
    Example: 1

  - `paymentMethodsCards` (array)
    Payment methods

  - `paymentMethodsCards.name` (string)
    Payment method name

  - `paymentMethodsCards.pan` (string)
    Specifies customer’s PAN (primary account number).
This is the payment card number.
Example: 411235455213655
    Example: 411235455213655

  - `paymentMethodsCards.expirationMonth` (integer)
    Specifies the expiration month of the card.

Example: 7
    Example: 7

  - `paymentMethodsCards.expirationYear` (integer)

  - `paymentMethodsCards.securityCode` (string)
    Security code

  - `paymentMethodsAchAccounts` (array)

  - `paymentMethodsAchAccounts.name` (string)

  - `paymentMethodsAchAccounts.accountNumber` (string)
    Specifies the payment target's bank account number.
We recommend using `paymentMethodId` instead of `accountNumber`.
Example: 5413591081013511
    Example: 5413591081013511

  - `paymentMethodsAchAccounts.routingNumber` (string)
    Specifies the payment target's bank routing number.

Example: 026009593
    Example: 026009593

  - `paymentMethodsAchAccounts.accountType` (integer)
    Identifies the account type.
Possible values:
| Type ID | Account Type | Description |
|  --- | --- | --- |
| 1 | Checking | Checking |
| 2 | Savings | Savings |

Example: 1
    Example: 1

  - `paymentMethodsAchAccounts.accountHolderType` (integer)
    Identifies the account holder type.
Possible values:
| Type ID | Account Type | Description |
|  --- | --- | --- |
| 1 | Business | Business |
| 2 | Personal | Personal |

Example: 1
    Example: 1

  - `paymentMethodsAchAccounts.taxId` (string)
    Specifies the customer's TIN (tax identifier number).

Example: 98-7654321
    Example: 98-7654321

## Response 200 fields (application/json):

  - `id` (string)
    Indicates the customerId or the customer identifier.

Example: 965865ef-b17d-4153-b952-d8902e584f7d
    Example: 965865ef-b17d-4153-b952-d8902e584f7d

## Response 400 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error
    Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
Example:
null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

## Response 404 fields (application/json):

  - `details` (string)

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)

  - `exceptionType` (string)

  - `correlationId` (string)

  - `entityId` (string)

  - `errorCode` (string)

## Response 500 fields (application/json):

  - `details` (string)

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)

  - `exceptionType` (string)

  - `correlationId` (string)

  - `entityId` (string)

  - `errorCode` (string)

