# Create Customer

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v0/customer:
    post:
      summary: Create Customer
      deprecated: false
      description: >-

        :::highlight purple 📌

        Use this API to create a customer profile in your EnKash system. This
        allows you to securely store customer details for repeat transactions,
        faster checkouts, and easier payment tracking.

        :::
      operationId: createCustomerUsingPOST
      tags:
        - Payment Gateway/APIs - Payment Gateway /UPI QR
        - Customer Apis
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerCreateRequest'
            example: ''
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ApplicationResponse%C2%ABCustomerResponse%C2%BB
          headers: {}
          x-apidog-name: OK
        '400':
          description: ''
          content:
            application/json:
              schema: &ref_0
                $ref: '#/components/schemas/ApplicationResponse'
          headers: {}
          x-apidog-name: Bad Request
        '401':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Unauthorized
        '403':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Forbidden
        '404':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Not Found
        '422':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Unprocessable Request
        '500':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Server Error
      security: []
      x-apidog-folder: Payment Gateway/APIs - Payment Gateway /UPI QR
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-8990295-run
components:
  schemas:
    CustomerCreateRequest:
      type: object
      required:
        - customerKeyContacts
        - legalName
      properties:
        accountNumber:
          type: string
          pattern: ^$|^[A-Za-z0-9]{9,36}$
          description: Unique account number for the customer
        address:
          type: string
          description: Physical address of the customer
        companyId:
          type: string
          pattern: ^CEK[A-Z0-9]{7}$
          description: Unique identifier for the company
        contactNumber:
          type: string
          pattern: ^$|^((\+|00)(\d{1,3})[\s-]?)?(\d{10})$
          description: Contact number of the customer
        customerCompanyId:
          type: string
          description: Unique identifier for the customer's company
        customerKeyContacts:
          type: array
          items:
            $ref: '#/components/schemas/CustomerKeyContactCreateDTO'
          description: Key contact persons for the customer
        customerReminders:
          type: array
          items:
            $ref: '#/components/schemas/CustomerReminderCreateDTO'
          description: Reminders for the customer
        externalSource:
          type: boolean
          description: Indicates if the customer is from an external source
        ifsc:
          type: string
          pattern: ^$|^[A-Za-z]{4}0[A-Z0-9a-z]{6}$
          description: IFSC code for the customer's bank
        legalName:
          type: string
          description: Legal name of the customer
        panOrGstin:
          type: string
          pattern: >-
            ^$|^(([0][1-9]|[1-2][0-9]|[3][0-7])[A-Za-z]{3}[ABCFGHLJPTKabcfghljptk][A-Za-z]\d{4}[A-Za-z][A-Za-z0-9][Zz][A-Za-z0-9])?|([A-Za-z]{3}[ABCFGHLJPTKEabcfghljptke][A-Za-z]\d{4}[A-Za-z])$
          description: PAN or GSTIN of the customer
        pinCode:
          type: string
          pattern: ^$|^[0-9]{6}$
          description: PIN code of the customer's address
        source:
          type: string
          enum:
            - ENKASH
            - TALLY
          description: Source of the customer information
        state:
          type: string
          description: State of the customer's address
        uniqueRefNo:
          type: string
          description: Unique reference number for the customer
      title: CustomerCreateRequest
      x-apidog-orders:
        - accountNumber
        - address
        - companyId
        - contactNumber
        - customerCompanyId
        - customerKeyContacts
        - customerReminders
        - externalSource
        - ifsc
        - legalName
        - panOrGstin
        - pinCode
        - source
        - state
        - uniqueRefNo
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    CustomerReminderCreateDTO:
      type: object
      properties:
        customerReminderId:
          type: string
        dueDateDifference:
          type: integer
          format: int32
        reminderInterval:
          type: integer
          format: int32
        reminderTime:
          type: object
          description: LocalTime
          x-apidog-orders: []
          examples:
            - HH:mm
          properties: {}
          x-apidog-ignore-properties: []
        reminderType:
          type: string
          enum:
            - ONCE
            - RECURRING
        stage:
          type: string
      title: CustomerReminderCreateDTO
      x-apidog-orders:
        - customerReminderId
        - dueDateDifference
        - reminderInterval
        - reminderTime
        - reminderType
        - stage
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    CustomerKeyContactCreateDTO:
      type: object
      required:
        - deleted
        - legalName
        - mobile
        - name
      properties:
        deleted:
          type: boolean
        email:
          type: string
          pattern: >-
            (?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)])
        keyContactPersonId:
          type: string
        legalName:
          type: string
        mail_enabled:
          type: boolean
        mobile:
          type: string
          pattern: ^$|^((\+|00)(\d{1,3})[\s-]?)?(\d{10})$
        name:
          type: string
        sms_enabled:
          type: boolean
        via:
          type: string
        whatsapp_enabled:
          type: boolean
      title: CustomerKeyContactCreateDTO
      x-apidog-orders:
        - deleted
        - email
        - keyContactPersonId
        - legalName
        - mail_enabled
        - mobile
        - name
        - sms_enabled
        - via
        - whatsapp_enabled
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApplicationResponse«CustomerResponse»:
      type: object
      properties:
        errorResponse: &ref_1
          $ref: '#/components/schemas/ErrorResponse'
        payload:
          $ref: '#/components/schemas/CustomerResponse'
        response_code:
          type: integer
          format: int32
        response_message:
          type: string
      title: ApplicationResponse«CustomerResponse»
      x-apidog-orders:
        - errorResponse
        - payload
        - response_code
        - response_message
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    CustomerResponse:
      type: object
      properties:
        accountNumber:
          type: string
        active:
          type: boolean
        address:
          type: string
        assignedAgent:
          type: string
        bankName:
          type: string
        branchCodes:
          type: array
          items:
            type: string
        companyId:
          type: string
        contactEmail:
          type: string
        contactNumber:
          type: string
        createdBy:
          type: string
        createdByName:
          type: string
        createdOn:
          type: string
          format: date-time
        customerId:
          type: string
        customerKeyContacts:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/CustomerKeyContactResponse'
        customerLogo:
          type: string
        customerReminders:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/CustomerReminderConfigResponse'
        dsoMedian:
          type: integer
          format: int64
        id:
          type: integer
          format: int64
        ifsc:
          type: string
        legalName:
          type: string
        modifiedBy:
          type: string
        modifiedByName:
          type: string
        modifiedOn:
          type: string
          format: date-time
        netAmount:
          type: number
        panOrGstin:
          type: string
        parentCompanyId:
          type: string
        parentLegalName:
          type: string
        pinCode:
          type: string
        state:
          type: string
        uniqueRefNo:
          type: string
        warnings:
          type: array
          items:
            type: string
      title: CustomerResponse
      x-apidog-orders:
        - accountNumber
        - active
        - address
        - assignedAgent
        - bankName
        - branchCodes
        - companyId
        - contactEmail
        - contactNumber
        - createdBy
        - createdByName
        - createdOn
        - customerId
        - customerKeyContacts
        - customerLogo
        - customerReminders
        - dsoMedian
        - id
        - ifsc
        - legalName
        - modifiedBy
        - modifiedByName
        - modifiedOn
        - netAmount
        - panOrGstin
        - parentCompanyId
        - parentLegalName
        - pinCode
        - state
        - uniqueRefNo
        - warnings
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    CustomerReminderConfigResponse:
      type: object
      properties:
        customerId:
          type: string
        customerReminderId:
          type: string
        dueDateDifference:
          type: integer
          format: int32
        reminderInterval:
          type: integer
          format: int32
        reminderTime:
          type: string
          examples:
            - HH:mm
        reminderType:
          type: string
          enum:
            - ONCE
            - RECURRING
        stage:
          type: string
      title: CustomerReminderConfigResponse
      x-apidog-orders:
        - customerId
        - customerReminderId
        - dueDateDifference
        - reminderInterval
        - reminderTime
        - reminderType
        - stage
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    CustomerKeyContactResponse:
      type: object
      properties:
        createdBy:
          type: string
        createdOn:
          type: string
          format: date-time
        customerId:
          type: string
        customerName:
          type: string
        deleted:
          type: string
        email:
          type: string
        keyContactPersonId:
          type: string
        mail_enabled:
          type: boolean
        mobile:
          type: string
        modifiedBy:
          type: string
        modifiedOn:
          type: string
          format: date-time
        name:
          type: string
        sms_enabled:
          type: boolean
        whatsapp_enabled:
          type: boolean
      title: CustomerKeyContactResponse
      x-apidog-orders:
        - createdBy
        - createdOn
        - customerId
        - customerName
        - deleted
        - email
        - keyContactPersonId
        - mail_enabled
        - mobile
        - modifiedBy
        - modifiedOn
        - name
        - sms_enabled
        - whatsapp_enabled
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ErrorResponse:
      type: object
      properties:
        apiSubErrors:
          type: array
          items:
            $ref: '#/components/schemas/ApiSubError'
        errorMessage:
          type: string
        errorType:
          type: string
          enum:
            - CLIENT_REQUEST_ABORT
            - CLIENT_REQUEST_ERROR
            - INVALID_ACCESS
            - RECORD_NOT_FOUND
            - SYSTEM_ERROR
            - UNAUTHORIZED
            - UNKNOWN_ERROR
            - UNPROCESSABLE_REQUEST
            - VALIDATION_ERROR
        requestId:
          type: string
        timestamp:
          type: string
          examples:
            - yyyy-MM-dd HH:mm:ss
      title: ErrorResponse
      x-apidog-orders:
        - apiSubErrors
        - errorMessage
        - errorType
        - requestId
        - timestamp
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApiSubError:
      type: object
      title: ApiSubError
      x-apidog-orders: []
      properties: {}
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApplicationResponse:
      type: object
      properties:
        errorResponse: *ref_1
        payload:
          type: object
          x-apidog-orders: []
          properties: {}
          x-apidog-ignore-properties: []
        response_code:
          type: integer
          format: int32
        response_message:
          type: string
      title: ApplicationResponse
      x-apidog-orders:
        - errorResponse
        - payload
        - response_code
        - response_message
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
