> For the complete documentation index, see [llms.txt](https://docs.hyperswitch.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyperswitch.io/integrations/prism/node/customer-service/create.md).

# Create

## Overview

The `create` method creates a customer record in the payment processor system. Storing customer details streamlines future transactions and can improve authorization rates.

**Business Use Case:** A new user signs up for your e-commerce platform. Create their customer profile to enable faster checkout on future purchases.

## Purpose

| Scenario        | Benefit                                         |
| --------------- | ----------------------------------------------- |
| Faster checkout | Returning customers skip entering details       |
| Payment history | Track all payments by customer                  |
| Fraud scoring   | Established customers have better risk profiles |
| Subscriptions   | Required for recurring billing setup            |

## Request Fields

| Field                | Type   | Required | Description                    |
| -------------------- | ------ | -------- | ------------------------------ |
| `merchantCustomerId` | string | Yes      | Your unique customer reference |
| `email`              | string | No       | Customer email address         |
| `name`               | string | No       | Customer full name             |
| `phone`              | string | No       | Customer phone number          |
| `description`        | string | No       | Internal description           |
| `metadata`           | object | No       | Additional data (max 20 keys)  |

## Response Fields

| Field                 | Type           | Description                                       |
| --------------------- | -------------- | ------------------------------------------------- |
| `merchantCustomerId`  | string         | Your customer reference                           |
| `connectorCustomerId` | string         | Connector's customer ID (e.g., Stripe's cus\_xxx) |
| `status`              | CustomerStatus | ACTIVE                                            |
| `statusCode`          | number         | HTTP status code                                  |

## Example

### SDK Setup

```javascript
const { CustomerClient } = require('hyperswitch-prism');

const customerClient = new CustomerClient({
    connector: 'stripe',
    apiKey: 'YOUR_API_KEY',
    environment: 'SANDBOX'
});
```

### Request

```javascript
const request = {
    merchantCustomerId: "cust_user_12345",
    email: "john.doe@example.com",
    name: "John Doe",
    phone: "+1-555-123-4567",
    description: "Premium plan subscriber"
};

const response = await customerClient.create(request);
```

### Response

```javascript
{
    merchantCustomerId: "cust_user_12345",
    connectorCustomerId: "cus_xxx",
    status: "ACTIVE",
    statusCode: 200
}
```

## Best Practices

* Create customers at account signup, not first purchase
* Use consistent `merchantCustomerId` format
* Store `connectorCustomerId` for future reference
* Include email for processor communications

## Next Steps

* [Payment Method Service](/integrations/prism/node/payment-method-service.md) - Store payment methods for customer
* [Payment Service](/integrations/prism/node/payment-service.md) - Process payments with customer ID
* [Recurring Payment Service](/integrations/prism/node/recurring-payment-service.md) - Set up subscriptions


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hyperswitch.io/integrations/prism/node/customer-service/create.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
