---
title: "POST /api/batch_create_customers/"
method: POST
path: "/api/batch_create_customers/"
tags: ["api"]
---

# POST /api/batch_create_customers/

`POST /api/batch_create_customers/`

## Request body

- CustomerBatchCreateRequestRequest
  - `customers` CustomerCreateRequest[], required
    - `customer_name` string, nullable — The display name of the customer
    - `customer_id` string, required — The id provided when creating the customer, we suggest matching with your internal customer id in your backend
    - `email` string, email, required — The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider
    - `payment_provider` 'stripe' — The payment provider this customer is associated with. Currently, only Stripe is supported.
    - `payment_provider_id` string, nullable — The customer's ID in the specified payment provider. Please note that payment_provider and payment_provider_id are mutually necessary.
    - `properties` object, nullable — Extra metadata for the customer
    - `default_currency_code` string — The currency code this customer will be invoiced in. Codes are 3 letters, e.g. 'USD'.
    - `address` AddressRequest
      - `city` string, required — City, district, suburb, town, or village
      - `country` string, required — ISO 3166-1 alpha-2 country code
      - `line1` string, required — Address line 1 (e.g., street, PO Box, or company name)
      - `line2` string, nullable — Address line 2 (e.g., apartment, suite, unit, or building)
      - `postal_code` string, required — ZIP or postal code
      - `state` string, required — State, county, province, or region
    - `tax_rate` number, double, nullable — Tax rate as percentage. For example, 10.5 for 10.5%
  - `behavior_on_existing` 'merge' | 'ignore' | 'overwrite', required

## Response `201`

- CustomerBatchCreateSuccess
  - `success` 'all' | 'some', required
  - `failed_customers` object

## Other responses

- `400`

## Changes

- **2023-01-16** `36b48cae00a3` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/uselotus/apis/lotus-api/changes/api/batch_create_customers/post.md)

---

[API](https://skmtc.dev/uselotus/apis/lotus-api.md) · [All operations](https://skmtc.dev/uselotus/apis/lotus-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/uselotus/lotus-api/revisions/36b48cae00a3/schema)
