# Creates a customer

<a id="flute-v2-post-customers"></a>
<span class="api-endpoint">POST {{<a href="#urlbases">baseURL</a>}}/v2/customers</span>
This endpoint creates a customer.
<span class="api-seealso">See Also:</span><br>
To list customers, see `GET /v2/customers`.<br>
To retrieve a customer by ID, see `GET /v2/customers/{customerId}`.<br>
To update a customer, see `PATCH /v2/customers/{customerId}`.<br>
To delete a customer, see `DELETE /v2/customers/{customerId}`.

Endpoint: POST /v2/customers
Version: V2 Beta
Security: Bearer

## Request fields (application/json):

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

Example: Alexandro
    Example: Alexandro

  - `lastName` (string, required)
    Specifies 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)
    Specifies the customer's email.
Example: peppared@example.com
    Example: peppared@example.com

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

  - `hasSmsConsent` (boolean)
    Specifies the customer has consented to receiving the SMS.
If `true`, the customer has consented to receiving the SMS.
If `false`, the customer has not consented to receiving the SMS.
Example: true
    Example: true

  - `shouldUseBillingAsShippingAddress` (boolean)
    Specifies to use the billing address as shipping address.
If `true`, use the billing address as shipping address.
If `false`, do not use the billing address as shipping address.
Example: true
    Example: true

  - `billingAddress` (object)
    Identifies the address information.

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

Example: 21 E. Main Street
    Example: 21 E. Main Street

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

Example: Office 3
    Example: Office 3

  - `billingAddress.city` (string)
    Identifies the name of the city.
Examples:
Chicago
New York
Salt Lake City
    Example: Chicago

  - `billingAddress.postalCode` (string)
    Identifies the postal or ZIP code.
Examples:
60601
60601-0001
    Example: 60601-0001

  - `billingAddress.stateCode` (string)
    Identifies the state identifier (in two-letter USPS [United States Postal Service] postal code).
For regions outside the US, use the ISO 3166-2 format.
Examples:
TX
WA
IL
    Example: NY

  - `billingAddress.countryCode` (string, required)
    Identifies the country identifier (in two letter ISO 3166-1 format).
Examples:
US
CA
GB
    Example: US

  - `paymentMethodsCards` (array)
    Specifies accepted cards (credit or debit) payment methods.

  - `paymentMethodsCards.paymentName` (string)
    Specifies the name for the payment method.

This is a free-formed name that is convenient for the merchant to recognize. 

Example: Peppared Street Cafe's Preferred Payment
    Example: Peppared Street Cafe's Preferred Payment

  - `paymentMethodsCards.cardNumber` (string, required)
    Specifies the card number.

This is the PAN (primary account number) for the transaction.

Example: 411235455213655
    Example: 411235455213655

  - `paymentMethodsCards.securityCode` (string)
    Specifies the securityCode (sometimes also called similarly to CCV) for the card.

This is a three or four digit security code on the credit card.

Example: 483
    Example: 483

  - `paymentMethodsCards.expirationMonth` (integer, required)
    Specifies the expiration month of the card (in 2-digit numeric format).
Examples:
02
10
12
    Example: 12

  - `paymentMethodsCards.expirationYear` (integer, required)
    Specifies the expiration year of the card (in 4-digit YYYY format).

Example: 2032
    Example: 2032

  - `paymentMethodsAchAccounts` (array)
    Specifies accepted ACH accounts payment methods.

  - `paymentMethodsAchAccounts.paymentName` (string)
    Specifies the name for the payment method.

This is a free-formed name that is convenient for the merchant to recognize.

Example: Peppared Street Cafe's Preferred Payment
    Example: Peppared Street Cafe's Preferred Payment

  - `paymentMethodsAchAccounts.routingNumber` (string)
    Specifies the ACH's account routing number.

Example: 021000021
    Example: 021000021

  - `paymentMethodsAchAccounts.accountNumber` (string)
    Specifies the bank account number for the ACH transaction.
We recommend avoiding the use of an account number.
Instead, use `paymentMethodId` when possible.
Example: 1234567890
    Example: 1234567890

  - `paymentMethodsAchAccounts.taxId` (string)
    Specifies the tax identifier.

Example: 12-3456789
    Example: 12-3456789

  - `paymentMethodsAchAccounts.accountHolderType` (string)
    Identifies the holder type of the account.
Valid values are:
| Type | Description |
|  --- | --- |
| Business | Card issued to a business or company account. |
| Personal | Card issued to an individual for personal use. |

Example: Business
    Enum: "Business", "Personal"

  - `paymentMethodsAchAccounts.accountType` (string)
    Identifies the type of the account.
Valid values are:
| Type | Description |
|  --- | --- |
| Checking | Account used for regular daily transactions. |
| Savings | Account used to hold and grow funds over time. |

Example: Checking
    Enum: "Checking", "Savings"

## Response 200 fields (application/json):

  - `customerId` (string)
    Identifies the customer to link this payment method to.

This value may be null when this payment method is an orphan owned by the merchant directly.
An orphan payment method is a payment method in the merchant's vault but has no customer record associated with it.

Example: 8fa8e727-73c6-436e-b56f-6f55aabf3b1c
    Example: 8fa8e727-73c6-436e-b56f-6f55aabf3b1c

## 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

  - `title` (string)

  - `cause` (string)

  - `resolution` (string)

  - `documentationUrl` (string)
    https://developer.flute.com/

## Response 401 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

  - `title` (string)

  - `cause` (string)

  - `resolution` (string)

  - `documentationUrl` (string)
    https://developer.flute.com/

## Response 403 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

  - `title` (string)

  - `cause` (string)

  - `resolution` (string)

  - `documentationUrl` (string)
    https://developer.flute.com/

## Response 404 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

  - `title` (string)

  - `cause` (string)

  - `resolution` (string)

  - `documentationUrl` (string)
    https://developer.flute.com/

## Response 429 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

  - `title` (string)

  - `cause` (string)

  - `resolution` (string)

  - `documentationUrl` (string)
    https://developer.flute.com/

## Response 500 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

  - `title` (string)

  - `cause` (string)

  - `resolution` (string)

  - `documentationUrl` (string)
    https://developer.flute.com/

