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

# Validate KYC OTP

> Validates the email OTP code for a KYC verification that is waiting on it. If the customer's identity was already resolved — for example, by reusing an approved KYC with Ripio, or a compatible `kycProviderShareToken` — the KYC is approved immediately. Otherwise, submit the customer's data next with [Submit KYC Information](/ramps-api/kyc/submit-kyc-information).

<Note>
  If the customer already has an approved KYC with Ripio, this call approves them immediately — no document upload and no `kycSubmission` needed. Otherwise, continue with [Submit KYC Information](/ramps-api/kyc/submit-kyc-information) to complete the verification.
</Note>

<Warning>
  Confirming the OTP only proves the customer owns that email — it does not by itself approve the KYC. Approval always depends on what the identity provider reports back.
</Warning>

<Tip>
  In sandbox, the code `123456` is always accepted — see [KYC in sandbox](/ramps-api/sandbox/kyc-in-sandbox).
</Tip>


## OpenAPI

````yaml ramps-api/openapi.json POST /api/v1/customers/{customerId}/kyc/otp/validate/
openapi: 3.1.0
info:
  title: Ripio Ramp API
  version: v1
  description: >-
    API for Ripio ramp services, enabling partners to integrate On-Ramp,
    Off-Ramp, customer management, KYC processes, and other financial
    functionalities. This API is RESTful, uses JSON for requests and responses,
    and standard HTTP status codes. This document is based on the
    'onramp-api.pdf' provided and aims to be compliant with OpenAPI
    Specification v3.1.0. The PDF indicates that the API documentation is a
    draft and subject to change.
servers:
  - url: https://skala-sandbox.ripio.com
    description: Sandbox environment
  - url: https://skala.ripio.com
    description: Production environment
security:
  - BearerToken: []
tags:
  - name: Authentication
    description: Operations related to API authentication and authorization.
  - name: Support Tickets
    description: >-
      Operations for raising and tracking customer support tickets with Ripio's
      support team. This feature must be enabled for your account by the Ripio
      team.
  - name: Customers
    description: Operations related to customer management.
  - name: KYC
    description: Operations related to Know Your Customer processes.
  - name: Fiat Accounts
    description: Operations related to managing fiat accounts and their requirements.
  - name: Quotes
    description: Operations related to obtaining and managing conversion quotes.
  - name: On-Ramp
    description: Operations related to fiat-to-crypto (on-ramp) processes.
  - name: Off-Ramp
    description: Operations related to crypto-to-fiat (off-ramp) processes.
  - name: Refunds
    description: >-
      Operations for returning the money of an on-ramp or off-ramp operation
      that could not be completed. Each ramp must be enabled for your account by
      the Ripio team.
  - name: Transactions
    description: Operations related to listing and managing all transaction types.
  - name: Networks
    description: >-
      Operations related to retrieving available deposit and withdrawal
      networks.
  - name: Rates
    description: Operations related to retrieving market rates.
  - name: Transaction Limits
    description: >-
      Operations related to retrieving per-transaction limits by currency and
      ramp operation.
  - name: Sandbox
    description: Operations specific to the sandbox environment for testing purposes.
  - name: Webhooks
    description: Webhook event notifications from Ripio Ramp API.
  - name: Sell and Pay
    description: >-
      Endpoints for managing Sell and Pay transactions, which allow customers to
      convert cryptocurrency to fiat currency and pay merchants via QR codes
paths:
  /api/v1/customers/{customerId}/kyc/otp/validate/:
    post:
      tags:
        - KYC
      summary: Validate KYC OTP
      description: >-
        Validates the email OTP code for a KYC verification that is waiting on
        it. If the customer's identity was already resolved — for example, by
        reusing an approved KYC with Ripio, or a compatible
        `kycProviderShareToken` — the KYC is approved immediately. Otherwise,
        submit the customer's data next with [Submit KYC
        Information](/ramps-api/kyc/submit-kyc-information).
      operationId: validateKycEmailOtp
      parameters:
        - $ref: '#/components/parameters/CustomerId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KycOtpValidationRequest'
      responses:
        '200':
          description: OTP validated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KycSubmissionResponse'
        '400':
          description: >-
            Bad Request - e.g., an invalid OTP code, or no KYC verification is
            currently waiting on an OTP for this customer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalidOtp:
                  summary: Invalid OTP code
                  value:
                    code: 20092
                    type: KycServiceValidateEmailOtpException
                    detail:
                      message: 'Error validating email OTP: ''Invalid code.''.'
                    status: 400
                notPendingOtp:
                  summary: >-
                    No verification is currently waiting on an OTP for this
                    customer
                  value:
                    code: 20047
                    type: KycOtpValidationNotPendingException
                    detail:
                      message: KYC submission is not pending OTP validation.
                    status: 400
        '401':
          description: Unauthorized - Invalid or missing access token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 40001
                type: NotAuthenticated
                detail:
                  message: Authentication credentials were not provided.
                  code: not_authenticated
                status: 401
        '403':
          description: >-
            Forbidden - your account is not configured for Ripio KYC reuse via
            OTP.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 20095
                type: KycUnifiedFlowNotEnabledException
                detail:
                  message: The unified KYC flow is not enabled for this account.
                status: 403
        '404':
          description: Not Found - Customer not found or inactive.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 40004
                type: NotFound
                detail:
                  message: Not found.
                  code: not_found
                status: 404
components:
  parameters:
    CustomerId:
      name: customerId
      in: path
      required: true
      description: Unique identifier for the customer.
      schema:
        type: string
        format: uuid
      example: 8142b065-79c4-4f48-9e33-11b17bc658d4
  schemas:
    KycOtpValidationRequest:
      type: object
      description: Payload for validating OTP.
      properties:
        code:
          type: string
          description: The OTP code to verify.
          example: '123456'
      required:
        - code
    KycSubmissionResponse:
      type: object
      properties:
        submissionId:
          type: string
          format: uuid
          description: Unique identifier for the submitted KYC data.
        createdAt:
          type: string
          format: date-time
          description: Date and time the KYC submission was created (UTC format).
        providerUrl:
          type: string
          format: url
          description: >-
            Points to a third-party KYC provider's widget to handle file uploads
            and liveness checks. Only available in production.
        otpRequired:
          type: boolean
          description: >-
            Whether the OTP sent to the customer's email still needs to be
            validated with [Validate KYC OTP](/ramps-api/kyc/validate-kyc-otp)
            before continuing. Only present for accounts configured for Ripio
            KYC reuse via OTP.
      required:
        - submissionId
        - createdAt
        - providerUrl
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: Application-specific error code.
        type:
          type: string
          description: Type of error or exception.
        detail:
          type:
            - object
            - array
          description: >-
            Error details. The shape depends on the error:


            - Most business errors return an object with a `message` key.

            - Field validation errors return an object keyed by field name, each
            holding an array of `{ message, code }`.

            - Request-level validation errors (e.g. a missing query parameter)
            return a bare array of `{ message, code }`.
          properties:
            message:
              type: string
              description: Detailed error message.
          additionalProperties: true
        status:
          type: integer
          description: HTTP status code.
      required:
        - code
        - type
        - detail
        - status
  securitySchemes:
    BearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Access token obtained via
        [/oauth2/token/](/ramps-api/authentication/acquire-access-token). Use as
        `Authorization: Bearer <access_token>`.

````