Swipelux
Customer API

Create a new customer

Create a new customer for a merchant

POST
/v1/customers

Authorization

X-API-Key<token>

In: header

Request Body

application/jsonOptional
firstNamestring

The first name of the customer

Minimum length: 1Maximum length: 1024
middleNamestring

The middle name of the customer

Minimum length: 1Maximum length: 1024
lastNamestring

The last name of the customer

Minimum length: 1Maximum length: 1024
emailRequiredstring

The primary email address of the customer

Format: "email"
phonestring

The primary phone number of the customer in E.164 format (e.g., +1234567890) - optional during creation

Minimum length: 1Maximum length: 32
metadataobject

The provided metadata of the customer

birthDatestring

The date of birth of the customer in ISO 8601 format (YYYY-MM-DD)

Format: "date"
residentialAddressobject

The residential address of the customer

identifyingInformationarray<object>

An array of identifying information for the customer

Response Body

The customer was created successfully

idRequiredstring

A unique identifier for the customer

firstNamestring | null

The first name of the customer

middleNamestring | null

The middle name of the customer

lastNamestring | null

The last name of the customer

emailRequiredstring

The primary email address of the customer

Format: "email"
phoneRequiredstring

The primary phone number of the customer in E.164 format (e.g., +1234567890)

Minimum length: 1Maximum length: 32
statusRequiredunknown

The KYC verification status of the customer

Value in: "not_started" | "incomplete" | "under_review" | "approved" | "rejected"
metadataobject | null

The provided metadata of the customer

walletAddressesarray<string>

Array of customer wallet addresses (only present in legacy mode)

balanceRequirednumber

The total balance of the customer in USD

createdAtRequiredstring

The creation date of the customer

Format: "date-time"
updatedAtRequiredstring

The last update date of the customer

Format: "date-time"
hintsarray<object>

Helpful suggestions for next API calls

export interface Response {
  /**
   * A unique identifier for the customer
   */
  id: string;
  /**
   * The first name of the customer
   */
  firstName?: string | null;
  /**
   * The middle name of the customer
   */
  middleName?: string | null;
  /**
   * The last name of the customer
   */
  lastName?: string | null;
  /**
   * The primary email address of the customer
   */
  email: string;
  /**
   * The primary phone number of the customer in E.164 format (e.g., +1234567890)
   */
  phone: string;
  /**
   * The KYC verification status of the customer
   */
  status: "not_started" | "incomplete" | "under_review" | "approved" | "rejected";
  /**
   * The provided metadata of the customer
   */
  metadata?: {
    [k: string]: string | number | boolean;
  } | null;
  /**
   * Array of customer wallet addresses (only present in legacy mode)
   */
  walletAddresses?: string[];
  /**
   * The total balance of the customer in USD
   */
  balance: number;
  /**
   * The creation date of the customer
   */
  createdAt: string;
  /**
   * The last update date of the customer
   */
  updatedAt: string;
  /**
   * Helpful suggestions for next API calls
   */
  hints?: {
    /**
     * Action description
     */
    description: string;
    /**
     * HTTP request details
     */
    request: {
      /**
       * HTTP method
       */
      method: string;
      /**
       * API endpoint URL
       */
      url: string;
      /**
       * Request body with placeholders
       */
      body?: {
        [k: string]: unknown;
      };
    };
  }[];
}
 
curl -X POST "https://wallet.swipelux.com/v1/customers" \
  -H "X-API-Key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "string",
    "middleName": "string",
    "lastName": "string",
    "email": "user@example.com",
    "phone": "string",
    "metadata": {
      "property1": "string",
      "property2": "string"
    },
    "birthDate": "2019-08-24",
    "residentialAddress": {
      "streetLine1": "string",
      "streetLine2": "string",
      "city": "string",
      "state": "string",
      "postalCode": "string",
      "country": "str"
    },
    "identifyingInformation": [
      {
        "type": "drivers_license",
        "issuingCountry": "str",
        "frontSideImage": "string",
        "backSideImage": "string"
      }
    ]
  }'
{
  "id": "string",
  "firstName": "string",
  "middleName": "string",
  "lastName": "string",
  "email": "user@example.com",
  "phone": "string",
  "status": "not_started",
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "walletAddresses": [
    "string"
  ],
  "balance": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "hints": [
    {
      "description": "string",
      "request": {
        "method": "string",
        "url": "string",
        "body": null
      }
    }
  ]
}