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

# Verify a Customer OTP Code for Email or Phone

> Verify an OTP code for customer's contact information.

Verify an OTP code that was previously sent to a customer's email address or phone number via the [Send Verification Code](/api-reference/enhanced-due-diligence/send-verification-code) endpoint. A successful response confirms that the customer controls the specified contact channel and advances their KYC verification criteria. If the code is expired or incorrect, send a new code and prompt the customer to try again.


## OpenAPI

````yaml openapi/spherepay.yaml POST /v2/customer/{id}/otp-verify
openapi: 3.0.0
info:
  contact: {}
  description: The Sphere REST API for payments, transfers, and accounts.
  title: Sphere API
  version: '2'
servers:
  - description: Production
    url: https://api.spherepay.co
security:
  - bearer: []
tags: []
paths:
  /v2/customer/{id}/otp-verify:
    post:
      summary: Verify Verification Code
      description: Verify an OTP code for customer's contact information.
      operationId: postV2CustomerByIdOtpVerify
      parameters:
        - description: Customer ID
          in: path
          name: id
          required: true
          schema:
            example: customer_f31121c389624d3697cbf3ea8830b7a4
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifyCustomerVerificationCodeDto'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifyCustomerVerificationCodeResponseDto'
          description: ''
        '400':
          content:
            application/json:
              examples:
                Bad Request:
                  summary: Bad Request
                  value:
                    code: address/invalid
                    correlationId: 28c61e885c6e5eaa78c1a2183a9b883c
                    detail: Invalid request parameters
                    status: 400
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
          description: Bad Request
        '404':
          content:
            application/json:
              examples:
                Not Found:
                  summary: Not Found
                  value:
                    code: resource/not-found
                    correlationId: 28c61e885c6e5eaa78c1a2183a9b883c
                    detail: Resource not found
                    status: 404
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
          description: Not Found
        '422':
          content:
            application/json:
              examples:
                Validation Error:
                  summary: Validation Error
                  value:
                    code: validation/failed
                    correlationId: 28c61e885c6e5eaa78c1a2183a9b883c
                    detail: Validation failed
                    errors:
                      - detail: Invalid email format
                        pointer: /email
                      - detail: Name is required
                        pointer: /name
                    status: 422
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
          description: Unprocessable Entity - Validation Error
components:
  schemas:
    VerifyCustomerVerificationCodeDto:
      properties:
        code:
          description: Verification code
          example: '123456'
          maxLength: 10
          minLength: 1
          type: string
        type:
          description: Type of verification code
          enum:
            - phone
            - email
          example: email
          type: string
      required:
        - type
        - code
      type: object
    VerifyCustomerVerificationCodeResponseDto:
      properties:
        customerId:
          description: Customer ID
          example: customer_f31121c389624d3697cbf3ea8830b7a4
          type: string
        verifiedAt:
          description: >-
            ISO 8601 formatted date and time of the verification code
            verification
          example: '2026-03-09T20:46:31.305Z'
          type: string
      required:
        - customerId
        - verifiedAt
      type: object
    ProblemDetailsDto:
      properties:
        code:
          type: string
        correlationId:
          type: string
        detail:
          type: string
        errors:
          items:
            properties:
              detail:
                type: string
              header:
                type: string
              parameter:
                type: string
              pointer:
                type: string
            required:
              - detail
            type: object
          type: array
        status:
          type: integer
        title:
          type: string
      required:
        - status
        - detail
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      scheme: bearer
      type: http

````