Skip to content

Creates a customer

Request

POST {{baseURL}}/v2/customers

This endpoint creates a customer.

See Also:
To list customers, see GET /v2/customers.
To retrieve a customer by ID, see GET /v2/customers/{customerId}.
To update a customer, see PATCH /v2/customers/{customerId}.
To delete a customer, see DELETE /v2/customers/{customerId}.

Security
Bearer
Bodyapplication/json
firstNamestring, non-emptyrequired

Specifies the customer's first name.

Example: Alexandro

Example:"Alexandro"
lastNamestring, non-emptyrequired

Specifies the customer's last name.

Example: Peppared

Example:"Peppared"
companyNamestring or null

Specifies the name of the customer's company or organization.

Example: Peppared Street Cafe

Example:"Peppared Street Cafe"
emailstring or null

Specifies the customer's email.

Example: peppared@example.com

Example:"peppared@example.com"
mobilePhoneNumberstring or null, (E.164), <= 20 characters^(null|\+\d{1,20})$

Specifies the customer's mobile phone number.

Example: +14155552309

Example:"+14155552309"
hasSmsConsentboolean or null

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

Default:false
Example:true
shouldUseBillingAsShippingAddressboolean

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

Default:false
Example:true
billingAddressobject or null

Identifies the address information.

shippingAddressobject or null

Identifies the address information.

paymentMethodsCardsArray of objects or null

Specifies accepted cards (credit or debit) payment methods.

paymentMethodsAchAccountsArray of objects or null

Specifies accepted ACH accounts payment methods.

curl -i -X POST \
  https://sandbox.api.flute.com/v2/customers \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "firstName": "John",
    "lastName": "Peppared",
    "companyName": "Acme Corp",
    "email": "john.doe@acme.com",
    "mobilePhoneNumber": "+14125553845",
    "hasSmsConsent": true,
    "shouldUseBillingAsShippingAddress": false,
    "billingAddress": {
      "city": "New York",
      "countryCode": "US",
      "addressLine1": "123 Main Street",
      "addressLine2": "Suite 100",
      "postalCode": "10001",
      "stateCode": "NY"
    },
    "shippingAddress": {
      "city": "Brooklyn",
      "countryCode": "US",
      "addressLine1": "456 Market Street",
      "addressLine2": "Suite 7B",
      "postalCode": "11201",
      "stateCode": "NY"
    },
    "paymentMethodsCreditCards": [
      {
        "paymentName": "My Visa Card",
        "cardNumber": "4111111111111111",
        "securityCode": "123",
        "expirationMonth": 12,
        "expirationYear": 2032
      }
    ],
    "paymentMethodsAchAccounts": [
      {
        "paymentName": "Business Checking",
        "routingNumber": "021000021",
        "accountNumber": "123456789",
        "taxId": "12-3456789",
        "accountHolderType": "Personal",
        "accountType": "Checking"
      }
    ]
  }'

Responses

OK

Bodyapplication/json
customerIdstring or null, (uuid)

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
{ "customerId": "e0bfe4be-c02a-4ded-bbdf-07a8bf8544c8" }