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

# Validate OTP

> Submit an OTP for a mobile money charge.



## OpenAPI

````yaml POST /api/b2b/fiat/deposit/{transactionId}/validate-otp
openapi: 3.1.0
info:
  title: Tanda API
  version: 1.0.0
  description: >-
    Collect and send KES payments in Kenya through M-PESA, Airtel Money and bank
    transfer.
servers:
  - url: https://api.tandapay.io
    description: Sandbox and production (your keys decide which)
security:
  - bearerAuth: []
tags:
  - name: Authentication
  - name: Account
  - name: Checkout
  - name: Collections
  - name: Payouts
  - name: Beneficiaries
  - name: Transactions
  - name: Reference data
  - name: Webhooks
paths:
  /api/b2b/fiat/deposit/{transactionId}/validate-otp:
    post:
      tags:
        - Collections
      summary: Validate OTP
      description: >-
        Submits an OTP for a mobile money charge when the webhook or transaction
        shows `stepRequired: "otp"`. After a valid OTP the charge keeps
        processing and a final webhook follows.
      operationId: validate-otp
      parameters:
        - name: transactionId
          in: path
          required: true
          description: The charge's `transactionId`.
          schema:
            type: string
          example: aB3dE5fG7hJ9kL1mN2pQ
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                otp:
                  type: string
                  description: The code the customer received.
                  example: '111111'
              required:
                - otp
            example:
              otp: '111111'
      responses:
        '200':
          description: OTP accepted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  transactionId:
                    type: string
              example:
                success: true
                message: OTP validated successfully.
                transactionId: aB3dE5fG7hJ9kL1mN2pQ
        '401':
          description: Missing, invalid or expired bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                message: Unauthorized
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          description: Human-readable; may change.
        errorCode:
          type: string
          description: Stable code to branch on.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Token from Generate bearer token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.