---
title: "Create a customer"
method: POST
path: "/api/customer"
tags: ["Customer"]
---

# Create a customer

`POST /api/customer`

Creates a customer for the authenticated merchant. Only the email is required. If a customer with this email already exists for the merchant, the existing customer is returned with HTTP 200 instead of 201. Use the `X-On-Behalf-Of` header to create the customer for a connected sub-merchant.

## Request body

- CreateCustomerDto
  - `email` string, email, required — Email address of the customer
  - `firstName` string, nullable — First name of the customer
  - `lastName` string, nullable — Last name of the customer

## Response `200`

Customer already existed; existing customer returned.

- CustomerResponseDto
  - `id` string, required — Unique identifier of the customer
  - `createdAt` string, date-time, required — Date when the customer was created
  - `updatedAt` string, date-time, required — Date when the customer was last updated
  - `email` string, nullable, required — Email address of the customer
  - `firstName` string, nullable, required — First name of the customer
  - `lastName` string, nullable, required — Last name of the customer
  - `phone` string, nullable, required — Phone number of the customer
  - `billingCountry` string, nullable, required — Billing country code (ISO 3166-1 alpha-2)
  - `businessName` string, nullable, required — Business name if purchasing as a business
  - `purchasingAsBusiness` boolean, required — Whether the customer is purchasing as a business
  - `taxId` string, nullable, required — Tax ID (e.g., VAT number) for business customers
  - `taxType` string, nullable, required — Type of tax ID (e.g., eu_vat, us_ein)
  - `paymentMethods` CustomerPaymentMethodResponseDto[], required — List of active payment methods for this customer
    - `id` string, required — Unique identifier of the payment method
    - `currency` 'EUR' | 'USD', required — Currency of the payment method
    - `cardBrand` string, nullable, required — Card brand (e.g., Visa, Mastercard)
    - `cardLast4` string, nullable, required — Last 4 digits of the card
    - `cardExpMonth` number, nullable, required — Card expiration month
    - `cardExpYear` number, nullable, required — Card expiration year
    - `isDefault` boolean, required — Whether this is the default payment method for this currency

## Other responses

- `201` — Customer created.
- `400` — Invalid customer data
- `401` — Unauthorized - Invalid API key

---

[API](https://skmtc.dev/inflowpay/apis/inflow-api.md) · [All operations](https://skmtc.dev/inflowpay/apis/inflow-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/inflowpay/inflow-api/revisions/3012dd3dd14a/schema)
