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

# Authenticate direct OTP

> Authenticate direct OTP



## OpenAPI

````yaml https://openapi.commercengine.io/ce-pos.json post /pos/payments/authenticate-direct-otp
openapi: 3.1.0
info:
  title: CE POS APIs
  description: >-
    The consolidated Point of Sale surface. Every operation is served under the
    storefront base URL; operations tagged POSAdmin are proxied to the admin
    service by the POS backend.
  version: '1.0'
servers:
  - url: https://staging.api.commercengine.io/api/v1/{store_id}/storefront
    description: Staging Server
    variables:
      store_id:
        description: Store ID
        default: store_id
    x-speakeasy-server-id: staging
  - url: https://prod.api.commercengine.io/api/v1/{store_id}/storefront
    description: Prod Server
    variables:
      store_id:
        description: Store ID
        default: store_id
    x-speakeasy-server-id: prod
security:
  - Authorization: []
tags:
  - name: POS
    description: Operations backed by the storefront service
  - name: POSAdmin
    description: Operations proxied to the admin service
paths:
  /pos/payments/authenticate-direct-otp:
    post:
      tags:
        - POS
      summary: Authenticate direct OTP
      description: Authenticate direct OTP
      operationId: pos-authenticate-direct-otp
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - txn_id
                - challenge_id
                - otp
              properties:
                txn_id:
                  description: >-
                    You can get the txn_id from the response of create order API
                    under the payment object inside the payment_info object. The
                    key is 'id' under the params object inside the
                    authentication object.
                  type: string
                challenge_id:
                  description: >-
                    You can get the challenge_id from the response of create
                    order API under the payment object inside the payment_info
                    object. The key is 'challenge_id' under the params object
                    inside the authentication object.
                  type: string
                otp:
                  type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - Authorization: []
components:
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
              - code
            properties:
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              code:
                type: string
              errors:
                type: object
    Unauthorized:
      description: Not authorized for given operation on the Resource
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
              - code
            properties:
              message:
                type: string
                examples:
                  - Not authorized for given operation on the Resource.
                x-speakeasy-error-message: true
              success:
                type: boolean
                default: false
              code:
                type: string
                examples:
                  - unauthorized
  securitySchemes:
    Authorization:
      type: http
      description: Access token
      scheme: bearer

````