POST
/
api
/
service
/
customer
/
create
JavaScript
import Ivy from '@getivy/node-sdk';

const client = new Ivy({
  apiKey: 'My API Key',
});

const customer = await client.customers.create();

console.log(customer.id);
{
  "id": "<string>",
  "email": "<string>",
  "emailAddress": "<string>",
  "phone": "<string>",
  "fullName": "<string>",
  "dateOfBirth": "<string>",
  "address": {
    "line1": "<string>",
    "line2": "<string>",
    "city": "<string>",
    "region": "02",
    "zipCode": "<string>",
    "country": "AF"
  },
  "bankAccounts": [
    {
      "last4digits": "<string>",
      "bank": {
        "id": "<string>",
        "logo": "<string>",
        "name": "<string>"
      }
    }
  ],
  "deleted": true,
  "deletedAt": "2023-11-07T05:31:56Z",
  "metadata": {}
}

Authorizations

X-Ivy-Api-Key
string
header
required

API key for authentication

Body

application/json
email
string

The email address of the customer

phone
string

The phone number of the customer in international format (e.g., +491631234567)

fullName
string

The full name or business name of the customer

dateOfBirth
string

Customer's date of birth in ISO 8601 datetime format. Example: '2025-09-05'. Reference: https://en.wikipedia.org/wiki/ISO_8601

address
object

The registered address of the customer

metadata
object

A collection of key-value pairs that can be associated with an object to store custom data in a structured manner. This allows you to attach arbitrary information to enhance the object with additional context or properties. To clear the metadata, send an empty object.

Response

200 - application/json

Returns the id and customer data for the newly created customer

id
string
required

The id of the customer

bankAccounts
object[]
required

Array of bank accounts remembered by user

email
string

The email address of the customer

emailAddress
string

Deprecated. Use the customer.email instead

phone
string

The phone number of the customer

fullName
string

The full name or business name of the customer

dateOfBirth
string

Customer's date of birth in ISO 8601 datetime format. Example: '2025-09-05'. Reference: https://en.wikipedia.org/wiki/ISO_8601

address
object

The registered address of the customer

deleted
boolean

Indicates whether the customer was deleted

deletedAt
string<date-time>

The customer deletion timestamp

metadata
object

A collection of key-value pairs that can be associated with an object to store custom data in a structured manner. This allows you to attach arbitrary information to enhance the object with additional context or properties. To clear the metadata, send an empty object.