# POST /api/customers

Create customer

Creates a new customer record for payment processing and tokenization.

**Operation ID:** `POST_api_customers`

## Authorization

Requires: Customers.Customers, Customers.Customers.Create, merchant scope.

Required permissions:
- `Customers.Customers`
- `Customers.Customers.Create`

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| suppressNulls | query | no | boolean | If true, omit properties with null values. |

## Request Body

**Content type:** `application/json`

Schema: `PhoeniXGateCustomersCustomersCustomerCreateDto`

_Example: Basic Customer_

Minimal customer record with name, contact info, and a default mailing address. To attach a stored card or ACH account, follow up with POST /api/customer/customers/{id}/stored-payment-methods (see AddStoredPaymentMethodInput examples) — that endpoint tokenizes the payment data server-side. Do not embed raw card or ACH data in StoredPaymentMethods on this payload; the customer CRUD path does not tokenize embedded payment methods.

```json
{
  "name": "John Doe",
  "merchantAssignedId": null,
  "merchantId": "00000000-0000-0000-0000-000000000001",
  "isActive": true,
  "contactDetail": {
    "addresses": [
      {
        "id": "a0a33ed8-5457-411e-ba9e-234e52bb7393",
        "address1": "123 Main St",
        "address2": "",
        "city": "Phoenix",
        "state": "AZ",
        "province": "",
        "zip": "85027",
        "postalCode": "",
        "country": "USA",
        "isMailing": true,
        "isDefault": true
      }
    ],
    "primaryContactName": "John Doe",
    "emailAddress": "john.doe@example.com",
    "phone": "555-555-0100",
    "fax": "",
    "companyUrl": ""
  },
  "tags": [ ],
  "storedPaymentMethods": [ ],
  "contracts": [ ],
  "notes": [ ]
}
```

_Example: Business Customer_

Business customer with company URL and corporate contact. Same two-step flow applies for stored payment methods — create the customer first, then call the dedicated stored-payment-methods endpoint to tokenize each card or ACH account.

```json
{
  "name": "Acme Corp",
  "merchantAssignedId": null,
  "merchantId": "00000000-0000-0000-0000-000000000001",
  "isActive": true,
  "contactDetail": {
    "addresses": [
      {
        "id": "cce14d27-48e7-4fd8-adf0-7c9996c9720d",
        "address1": "1 Corporate Way",
        "address2": "",
        "city": "Phoenix",
        "state": "AZ",
        "province": "",
        "zip": "85027",
        "postalCode": "",
        "country": "USA",
        "isMailing": true,
        "isDefault": true
      }
    ],
    "primaryContactName": "Accounts Payable",
    "emailAddress": "ap@acme.example.com",
    "phone": "555-555-0200",
    "fax": "",
    "companyUrl": "https://acme.example.com"
  },
  "tags": [ ],
  "storedPaymentMethods": [ ],
  "contracts": [ ],
  "notes": [ ]
}
```

**Content type:** `text/json`

Schema: `PhoeniXGateCustomersCustomersCustomerCreateDto`

_Example: Basic Customer_

Minimal customer record with name, contact info, and a default mailing address. To attach a stored card or ACH account, follow up with POST /api/customer/customers/{id}/stored-payment-methods (see AddStoredPaymentMethodInput examples) — that endpoint tokenizes the payment data server-side. Do not embed raw card or ACH data in StoredPaymentMethods on this payload; the customer CRUD path does not tokenize embedded payment methods.

```json
{
  "name": "John Doe",
  "merchantAssignedId": null,
  "merchantId": "00000000-0000-0000-0000-000000000001",
  "isActive": true,
  "contactDetail": {
    "addresses": [
      {
        "id": "a0a33ed8-5457-411e-ba9e-234e52bb7393",
        "address1": "123 Main St",
        "address2": "",
        "city": "Phoenix",
        "state": "AZ",
        "province": "",
        "zip": "85027",
        "postalCode": "",
        "country": "USA",
        "isMailing": true,
        "isDefault": true
      }
    ],
    "primaryContactName": "John Doe",
    "emailAddress": "john.doe@example.com",
    "phone": "555-555-0100",
    "fax": "",
    "companyUrl": ""
  },
  "tags": [ ],
  "storedPaymentMethods": [ ],
  "contracts": [ ],
  "notes": [ ]
}
```

_Example: Business Customer_

Business customer with company URL and corporate contact. Same two-step flow applies for stored payment methods — create the customer first, then call the dedicated stored-payment-methods endpoint to tokenize each card or ACH account.

```json
{
  "name": "Acme Corp",
  "merchantAssignedId": null,
  "merchantId": "00000000-0000-0000-0000-000000000001",
  "isActive": true,
  "contactDetail": {
    "addresses": [
      {
        "id": "cce14d27-48e7-4fd8-adf0-7c9996c9720d",
        "address1": "1 Corporate Way",
        "address2": "",
        "city": "Phoenix",
        "state": "AZ",
        "province": "",
        "zip": "85027",
        "postalCode": "",
        "country": "USA",
        "isMailing": true,
        "isDefault": true
      }
    ],
    "primaryContactName": "Accounts Payable",
    "emailAddress": "ap@acme.example.com",
    "phone": "555-555-0200",
    "fax": "",
    "companyUrl": "https://acme.example.com"
  },
  "tags": [ ],
  "storedPaymentMethods": [ ],
  "contracts": [ ],
  "notes": [ ]
}
```

**Content type:** `application/*+json`

Schema: `PhoeniXGateCustomersCustomersCustomerCreateDto`

_Example: Basic Customer_

Minimal customer record with name, contact info, and a default mailing address. To attach a stored card or ACH account, follow up with POST /api/customer/customers/{id}/stored-payment-methods (see AddStoredPaymentMethodInput examples) — that endpoint tokenizes the payment data server-side. Do not embed raw card or ACH data in StoredPaymentMethods on this payload; the customer CRUD path does not tokenize embedded payment methods.

```json
{
  "name": "John Doe",
  "merchantAssignedId": null,
  "merchantId": "00000000-0000-0000-0000-000000000001",
  "isActive": true,
  "contactDetail": {
    "addresses": [
      {
        "id": "a0a33ed8-5457-411e-ba9e-234e52bb7393",
        "address1": "123 Main St",
        "address2": "",
        "city": "Phoenix",
        "state": "AZ",
        "province": "",
        "zip": "85027",
        "postalCode": "",
        "country": "USA",
        "isMailing": true,
        "isDefault": true
      }
    ],
    "primaryContactName": "John Doe",
    "emailAddress": "john.doe@example.com",
    "phone": "555-555-0100",
    "fax": "",
    "companyUrl": ""
  },
  "tags": [ ],
  "storedPaymentMethods": [ ],
  "contracts": [ ],
  "notes": [ ]
}
```

_Example: Business Customer_

Business customer with company URL and corporate contact. Same two-step flow applies for stored payment methods — create the customer first, then call the dedicated stored-payment-methods endpoint to tokenize each card or ACH account.

```json
{
  "name": "Acme Corp",
  "merchantAssignedId": null,
  "merchantId": "00000000-0000-0000-0000-000000000001",
  "isActive": true,
  "contactDetail": {
    "addresses": [
      {
        "id": "cce14d27-48e7-4fd8-adf0-7c9996c9720d",
        "address1": "1 Corporate Way",
        "address2": "",
        "city": "Phoenix",
        "state": "AZ",
        "province": "",
        "zip": "85027",
        "postalCode": "",
        "country": "USA",
        "isMailing": true,
        "isDefault": true
      }
    ],
    "primaryContactName": "Accounts Payable",
    "emailAddress": "ap@acme.example.com",
    "phone": "555-555-0200",
    "fax": "",
    "companyUrl": "https://acme.example.com"
  },
  "tags": [ ],
  "storedPaymentMethods": [ ],
  "contracts": [ ],
  "notes": [ ]
}
```

## Responses

### 200

OK

**Content type:** `text/plain`

Schema: `PhoeniXGateCustomersCustomersCustomerDto`

**Content type:** `application/json`

Schema: `PhoeniXGateCustomersCustomersCustomerDto`

**Content type:** `text/json`

Schema: `PhoeniXGateCustomersCustomersCustomerDto`

### 403

Forbidden

**Content type:** `text/plain`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `text/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

### 401

Unauthorized

**Content type:** `text/plain`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `text/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

### 400

Bad Request

**Content type:** `text/plain`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `text/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

### 404

Not Found

**Content type:** `text/plain`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `text/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

### 501

Not Implemented

**Content type:** `text/plain`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `text/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

### 500

Internal Server Error

**Content type:** `text/plain`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `text/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

### default

The request failed. The body carries the standard error envelope: a machine-readable `error.code`, a human-readable `error.message`, and `error.validationErrors` when the failure was a validation rejection. See the error-code reference in this document's description for the values `error.code` can take.

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

## See also

- [All documentation](https://docs.winkpg.io/llms.txt): the machine-readable index of every public page on this site.
