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

# Lipa na M-Pesa Withdrawal

> Send money from integrator wallet to customer via Lipa na M-Pesa STK Push or to a business shortcode.

Send money from integrator wallet to customer via Lipa na M-Pesa STK Push or to a business shortcode.


## OpenAPI

````yaml POST /api/v3/withdraw/lipa-na-mpesa
openapi: 3.0.0
info:
  title: KOTANI PAY API PLATFORM
  description: ''
  version: '3.0'
  contact: {}
servers:
  - url: https://preview.kotanipay.com
security: []
tags: []
paths:
  /api/v3/withdraw/lipa-na-mpesa:
    post:
      tags:
        - WITHDRAW
      summary: Withdraw via Lipa na M-Pesa (Kenya)
      description: >-
        Send money from integrator wallet to customer via Lipa na M-Pesa STK
        Push or to a business shortcode.
      operationId: WithdrawController_lipaNaMpesa_api/v3
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLipaNaMpesaWithdrawDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Lipa na M-Pesa withdrawal has been successfully created.
                  data:
                    $ref: '#/components/schemas/WithdrawResponseDto'
                    type: object
        '400':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Bad Request
                  data:
                    type: object
                    example: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Invalid API Key
                  data:
                    type: object
                    example: {}
      security:
        - JWT: []
components:
  schemas:
    CreateLipaNaMpesaWithdrawDto:
      type: object
      properties:
        amount:
          type: number
          description: Amount to pay
          example: 100
        walletId:
          type: string
          description: Wallet ID to debit from
          example: 5f9b2c7b9c9d6b0017b4e6b1
        callbackUrl:
          type: string
          description: Callback URL for status updates
          example: https://example.com/callback
        referenceId:
          type: string
          description: Your reference ID
          example: LIPA-001
        lipaNaMpesaDetails:
          description: Lipa na M-Pesa payment details
          allOf:
            - $ref: '#/components/schemas/LipaNaMpesaDetailsDto'
      required:
        - amount
        - walletId
        - lipaNaMpesaDetails
    WithdrawResponseDto:
      type: object
      properties:
        id:
          type: string
        message:
          type: string
        referenceId:
          type: string
        referenceNumber:
          type: number
      required:
        - id
        - message
        - referenceId
        - referenceNumber
    LipaNaMpesaDetailsDto:
      type: object
      properties:
        businessShortcode:
          type: string
          description: >-
            Till number (Business shortcode) to pay to - e.g., 174379 for Buy
            Goods
          example: '174379'
        accountReference:
          type: string
          description: Account reference for the payment (optional)
          example: ORDER123
        transactionDesc:
          type: string
          description: Transaction description (optional)
          example: Payment for goods
        phoneNumber:
          type: string
          description: >-
            Phone number for SMS notification (optional, in international
            format)
          example: '+254712345678'
      required:
        - businessShortcode
  securitySchemes:
    JWT:
      scheme: bearer
      bearerFormat: JWT
      type: http

````