> ## 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.

# Mock KYC Status [Sandbox Only]

> Simulates KYC status transitions in the sandbox environment for testing your KYC flow.

<Prompt description="Mock KYC Status [Sandbox Only]" actions={["cursor"]}>
  Use the DollarPe Mock KYC Status endpoint to test my KYC verification flow in sandbox.

  Endpoint: PATCH /kyc/mock-kyc-status (sandbox only)
  Base URL: [https://sandbox.dollarpe.in](https://sandbox.dollarpe.in)

  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 test helper that:

  1. Accepts customer\_id and target\_status (e.g. APPROVED or REJECTED)
  2. Calls PATCH /kyc/mock-kyc-status
  3. Verifies the status change
  4. Used in integration tests to simulate KYC approval before running payin/payout flows

  Language: TypeScript
</Prompt>

<Note>
  This endpoint is available only in the **Sandbox environment** and allows you to simulate KYC status changes for testing purposes.

  This endpoint follows specific state transition rules:

  * If current status is **UNVERIFIED**: No status changes are allowed
  * If current status is **FAILED** or **VERIFIED**: Can only be changed to **UNVERIFIED**
  * If current status is **PROCESSING**: Can be changed to **TAX\_VERIFICATION\_FAILED**, **DOCUMENT\_VERIFICATION\_FAILED**, **VERIFIED**, or **UNVERIFIED**

  Attempting to change the status outside of these allowed transitions will result in an error.
</Note>


## OpenAPI

````yaml PATCH /kyc/mock-kyc-status
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/mock-kyc-status:
    patch:
      tags:
        - KYC
      description: Mock KYC Status of the customer [Sandbox Environment Only]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - customer_id
                - kyc_status
              properties:
                customer_id:
                  type: string
                  format: uuid
                  example: 4e6f1b20-a73c-11ec-b909-0242ac120002
                kyc_status:
                  type: string
                  example: VERIFIED
      responses:
        '200':
          description: KYC Status updated 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: VERIFIED
        '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

````