> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dollarpe.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Add KYC Data

> Submits identity documents and personal details to begin KYC verification for a customer.

<Prompt description="Add KYC Data" actions={["cursor"]}>
  Integrate the DollarPe Add KYC Data endpoint into my application.

  Endpoint: POST /kyc/add-kyc-data
  Base URL: [https://api.dollarpe.in](https://api.dollarpe.in) (production) | [https://sandbox.dollarpe.in](https://sandbox.dollarpe.in) (sandbox)

  Auth headers required on every request:

  * X-API-KEY: your API key
  * X-TIMESTAMP: current Unix time in seconds
  * X-SIGNATURE: Base64(HMAC-SHA256(X-API-KEY + X-TIMESTAMP + sortedJSONBody, apiSecret))

  Task: Write a typed function that:

  1. Accepts customer\_id and KYC payload (personal details, document references)
  2. Builds the signed auth headers
  3. Calls POST /kyc/add-kyc-data
  4. Returns the KYC submission status
  5. Handles 400 (already submitted, invalid data) and 500 errors

  Language: TypeScript
</Prompt>

<Note>
  Currently, Payins (on-ramp) is only supported for Aadhaar verified customers.
</Note>

## Error Codes and Messages

| API Status Code | Response                            | Reason                                       |
| --------------- | ----------------------------------- | -------------------------------------------- |
| 400             | Customer not found or access denied | Customer not found                           |
| 400             | Customer not found or access denied | Customer does not belong to the organization |
| 400             | KYC already exists                  | KYC already exists for the customer          |
| 400             | KYC already in use                  | KYC is being used by another customer        |
| 500             | Internal Server Error               | Internal Server Error                        |


## OpenAPI

````yaml POST /kyc/add-kyc-data
openapi: 3.1.0
info:
  title: DollarPe API
  description: API for DollarPe - Customer, Payout, and Webhook services
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://sandbox.dollarpe.xyz/pos/api/v1
    description: Payout API Base URL
    variables:
      base_url:
        default: https://sandbox.dollarpe.xyz
  - url: https://sandbox.dollarpe.xyz/cms/api/v1
    description: Customer API Base URL
    variables:
      base_url:
        default: https://sandbox.dollarpe.xyz
security:
  - ApiKeyAuth: []
    TimestampAuth: []
    SignatureAuth: []
tags:
  - name: Customer
    description: Customer related operations
    x-displayName: Customer
    x-traitTag: true
  - name: Payout
    description: Payout related operations
  - name: Webhooks
    description: Webhook related operations
  - name: Widget
    description: Hosted buy/sell widget session initialization
paths:
  /kyc/add-kyc-data:
    post:
      tags:
        - KYC
      description: Add KYC information for a customer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - customer_id
                - full_name
                - phone
                - full_address
                - dob
                - registered_date
                - tax_number
                - document_type
                - document_front_image_url
                - document_back_image_url
                - document_details
                - selfie_url
                - selfie_verification_status
                - additional_info
              properties:
                customer_id:
                  type: string
                  format: uuid
                  example: 4e6f1b20-a73c-11ec-b909-0242ac120002
                full_name:
                  type: string
                  example: John Doe
                phone:
                  type: string
                  example: '9911002211'
                full_address:
                  type: string
                  example: FULL_ADDRESS_OF_THE_CUSTOMER
                dob:
                  type: string
                  format: date
                  example: DD-MM-YYYY
                registered_date:
                  type: string
                  format: date
                  example: DD-MM-YYYY
                tax_number:
                  type: string
                  example: ABCPG1234N
                document_type:
                  type: string
                  description: >-
                    Document type as returned by
                    /kyc/configuration/{customer_id} (e.g. PASSPORT, etc.)
                document_front_image_url:
                  type: string
                  description: Accepts JPG, JPEG, PNG and PDF links
                  format: uri
                document_back_image_url:
                  type: string
                  description: Accepts JPG, JPEG, PNG and PDF links
                  format: uri
                document_details:
                  type: object
                  required:
                    - document_number
                  properties:
                    document_number:
                      type: string
                      example: '123456123456'
                    additional_data:
                      type: object
                selfie_url:
                  type: string
                  description: Accepts JPG, JPEG and PNG links
                  format: uri
                selfie_verification_status:
                  type: boolean
                  example: true
                additional_info:
                  type: object
                  description: >-
                    Additional fields required based on
                    /kyc/configuration/{customer_id} (e.g. ssn_number, visa)
      responses:
        '200':
          description: KYC data added successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Success
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: 550e8400-e29b-41d4-a716-446655440000
                      status:
                        type: string
                        example: PROCESSING
                      failure_reason:
                        type: string
                        example: null
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Internal Server Error
                  err_code:
                    type: string
                    example: SYS_INTERNAL_ERROR
                  errors:
                    type: string
                    example: Unexpected error occurred. Please try again later.
                  data:
                    type: 'null'
      servers:
        - url: https://sandbox.dollarpe.xyz/cms/api/v1
          description: KYC API Base URL
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API Key for authentication
    TimestampAuth:
      type: apiKey
      in: header
      name: X-TIMESTAMP
      description: Current timestamp in seconds since epoch
    SignatureAuth:
      type: apiKey
      in: header
      name: X-SIGNATURE
      description: HMAC SHA256 signature of the request encoded in Base64

````