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

# Preview Lipa Namba Payout

> Validates a Lipa Namba or TanQR payout and returns the fee, balance, and beneficiary name.

<Note>
  Provide exactly one destination: `lipaNamba` + `providerCode`, or TanQR `qrCode`. Preview must resolve a beneficiary name before you create the payout.
</Note>


## OpenAPI

````yaml api-reference/disbursement/lipa-namba-payout/openapi.json POST /payouts/preview-lipa-namba-payout
openapi: 3.0.1
info:
  title: CORE API OpenAPI Specification
  description: This is the API documentation for the ClickPesa CORE API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.clickpesa.com/third-parties
security:
  - bearerAuth: []
paths:
  /payouts/preview-lipa-namba-payout:
    post:
      tags:
        - Payouts
        - Preview
      description: >-
        Validates a Lipa Namba or TanQR payout and returns the fee, balance, and
        beneficiary name.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LipaNambaPayoutRequest'
      responses:
        '200':
          description: Lipa Namba payout preview response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreviewLipaNambaPayoutResponse'
        '400':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '401':
          description: Invalid or Expired Token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '409':
          description: Conflict Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
components:
  schemas:
    LipaNambaPayoutRequest:
      type: object
      required:
        - amount
        - orderReference
        - currency
      properties:
        amount:
          type: number
          description: Your payout amount
        currency:
          type: string
          enum:
            - TZS
            - USD
          description: >-
            Account currency to pay out from (TZS or USD). Recipient receives
            TZS.
        orderReference:
          type: string
          description: Your unique Order reference
        lipaNamba:
          type: string
          description: >-
            Recipient Lipa Namba (merchant code). Required if `qrCode` is not
            sent. Do not send with `qrCode`.
          example: '48001268'
        providerCode:
          type: string
          description: >-
            Required when `lipaNamba` is provided. Use a `providerCode` from
            [Retrieve Lipa Namba
            Providers](/api-reference/disbursement/lipa-namba-payout/list-lipa-namba-providers).
          example: '503'
        qrCode:
          type: string
          description: >-
            Full TanQR string. Must include `tz.go.bot.tips`. Required if
            `lipaNamba` is not sent. Do not send with `lipaNamba`.
        checksum:
          type: string
          description: >-
            If enabled, this is the generated checksum of the payload. Refer to
            the [documentation](/home/checksum) for more details.
    PreviewLipaNambaPayoutResponse:
      type: object
      properties:
        amount:
          type: number
          description: Total amount to be deducted from your account balance (includes fee)
          example: 10100
        balance:
          type: number
          example: 250000
        channelProvider:
          type: string
          example: Vodacom M-Pesa
        fee:
          type: number
          description: Transaction fee deducted from source currency (included in amount)
          example: 100
        exchanged:
          type: boolean
          description: >-
            Indicates if currency conversion was applied (true when source
            currency differs from receiving currency)
          example: true
        exchange:
          type: object
          description: Exchange rate details (only present when exchanged is true)
          properties:
            sourceCurrency:
              type: string
              description: Source currency for the exchange
              example: USD
            targetCurrency:
              type: string
              description: Target currency for the exchange
              example: TZS
            sourceAmount:
              type: number
              description: Amount in source currency
              example: 1000
            rate:
              type: number
              description: Exchange rate used for conversion
              example: 2500
        order:
          type: object
          properties:
            amount:
              type: number
              description: Amount to be added during order creation/payload
              example: 10000
            currency:
              type: string
              example: TZS
            id:
              type: string
              example: UNIQUEREFERENCE
        payoutFeeBearer:
          type: string
          example: merchant
          enum:
            - merchant
            - both
            - customer
        receiver:
          type: object
          properties:
            accountName:
              type: string
              description: >-
                Name returned from Lipa Namba lookup. Preview fails if this
                cannot be resolved.
              example: ACME TRADERS LTD
            accountNumber:
              type: string
              description: Lipa Namba / merchant code credited
              example: '48001268'
            accountCurrency:
              type: string
              description: Currency the recipient will receive funds in
              example: TZS
            amount:
              type: number
              description: Amount the recipient will receive in TZS
              example: 10000
    ValidationError:
      type: object
      properties:
        message:
          type: string
          enum:
            - Valid Client ID is required
            - >-
              Application has no access to PAYOUT API feature. Enable it on your
              application.
            - >-
              Invalid Order Reference, should only contain alphanumeric
              characters and cannot be blank
            - lipaNamba or qrCode is required
            - Provide either lipaNamba or qrCode, not both
            - providerCode is required when lipaNamba is provided
            - >-
              Lipa Namba beneficiary name could not be resolved. Preview is
              required before payout.
            - 'Insufficient balance: available balance is {balance} TZS'
            - >-
              Payout request is already in progress, please retry after
              {remaining time} seconds
          example: lipaNamba or qrCode is required
    UnauthorizedError:
      type: object
      properties:
        message:
          type: string
          description: Unauthorized Error
          example: Unauthorized
    ConflictError:
      type: object
      properties:
        message:
          type: string
          description: Conflict message when an order reference is already used
          example: >-
            Order reference {Your reference} already used: Create a different
            reference
    InternalServerError:
      type: object
      properties:
        message:
          type: string
          description: Internal Server Error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authorization header containing the JWT access token returned from the
        generate token endpoint. The token already includes the Bearer prefix.
        Example: `Authorization: Bearer eyJhbGciOi...`
      bearerFormat: JWT

````