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

# Get Payment Status

> Fetch Mobile Money transaction by ID



## OpenAPI

````yaml GET /momo/{transactionId}
openapi: 3.0.1
info:
  title: Stable Pay API
  description: The API for the Stable Pay Gateway
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.stablepay.ai
security:
  - bearerAuth: []
tags:
  - name: Transactions
    description: Operations related to payment transactions
  - name: Payouts
    description: Operations related to payouts
  - name: Identity
    description: Operations related to Stablepay ID management
  - name: Mpesa
    description: Operations related to Mpesa payouts
  - name: ForeignExchange
    description: Operations related to currency conversion
  - name: MoMo
    description: Operations related to Mobile Money
  - name: resolve
    description: Operations related to account resolution
  - name: validate
    description: Operations related to account validation
paths:
  /momo/{transactionId}:
    get:
      tags:
        - Mpesa
      summary: Get Mobile Money (MoMo) Status
      description: Fetch Mobile Money transaction by ID
      operationId: getMpesaTransaction
      parameters:
        - name: transactionId
          in: path
          description: >-
            Transaction ID to query the transaction status using the Stablepay
            Get Payment Status
          required: true
          schema:
            type: string
            minLength: 5
            maxLength: 15
            pattern: ^[a-zA-Z0-9]+$
      responses:
        '200':
          description: Payout status retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MpesaStatusResponse'
        '401':
          description: Unauthorized - invalid or missing authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MomoInvalidKeys'
        '404':
          description: Invalid transaction ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MomoNotFoundError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
components:
  schemas:
    MpesaStatusResponse:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          description: Payout status.
          enum:
            - Successful
            - Unsuccessful
        confirmationID:
          type: string
          description: 'If Successful: M-Pesa payment confirmation code.'
    MomoInvalidKeys:
      type: object
      required:
        - error
        - message
      properties:
        message:
          type: string
          description: API key is required to access this endpoint.
        error:
          type: string
          description: Missing Authorization Header
        details:
          type: string
          description: >-
            Please provide a valid API key in the Authorization header using
            Bearer scheme
        statusCode:
          type: integer
          format: int32
          description: Error code
    MomoNotFoundError:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Not Found
        message:
          type: string
          description: 'No transaction found for transaction ID: xxxxx'
        statusCode:
          type: integer
          format: int32
          description: Error code
    InternalServerError:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: integer
          format: int32
          description: Error code
        message:
          type: string
          description: Error message
        details:
          type: object
          description: Additional error details
          additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        API key authentication using Bearer scheme. 
         Format: Bearer {STA_xxxx}

````