> ## 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

> Fetches the status of a transaction from the reference.



## OpenAPI

````yaml GET /tx/payment-status/{reference}
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:
  /tx/payment-status/{reference}:
    get:
      tags:
        - Transactions
      summary: Get Payment Status
      description: Fetches the status of a transaction from the reference.
      operationId: getPaymentStatus
      parameters:
        - name: reference
          in: path
          description: Reference of the transaction to confirm.
          required: true
          schema:
            type: string
            minLength: 1
      responses:
        '200':
          description: Transaction status fetched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentStatus'
        '400':
          description: Bad request - invalid reference format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - invalid or missing authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Transaction not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Reference key reuse error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TxRequestResponseReUsekey'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    PaymentStatus:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          description: >-
            The status of the transaction can either be processed or not
            processed.
          enum:
            - processed
            - not_processed
          example: processed
        timestamp:
          type: string
          format: date-time
          description: Timestamp when the status was last updated.
        amount:
          type: number
          description: Transaction amount if processed.
          minimum: 0
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: integer
          format: int32
          description: Error code
        message:
          type: string
          description: Human-readable error message
        details:
          type: object
          description: Additional error details
          additionalProperties: true
    TxRequestResponseReUsekey:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Error message about reference key reuse.
          example: >-
            You cannot reuse a reference key. Call
            https://api.stablepay.ai/tx/getNewReference to get a new key for
            your transaction.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        API key authentication using Bearer scheme. 
         Format: Bearer {STA_xxxx}

````