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

# Check payment status

> Check the state of a collection invoice.



## OpenAPI

````yaml /openapi.yml post /payment/status
openapi: 3.0.0
info:
  title: KulmiPay API
  description: >-
    Public API reference for KulmiPay collections, Send Money, wallets, refunds,
    and M-Pesa account configuration.
  version: 1.0.0
servers:
  - url: https://sandbox.kulmipay.com/api/v1
    description: Sandbox
  - url: https://app.kulmipay.com/api/v1
    description: Live
security:
  - SecretAPIKeyScheme: []
tags:
  - name: Collections
    description: >-
      Create hosted checkout sessions, M-Pesa STK Push requests, and payment
      status checks.
  - name: Send Money
    description: Initiate, approve, cancel, and track payout files.
  - name: Wallet as a Service
    description: Manage wallets, statements, wallet funding, and internal transfers.
  - name: Refunds
    description: Create and retrieve refund requests through the chargebacks API.
  - name: Bring Your M-Pesa Till/PayBill Number
    description: Configure M-Pesa Till and PayBill accounts.
  - name: Webhooks
    description: Retrieve webhook configuration and delivery events.
paths:
  /payment/status:
    parameters: []
    post:
      tags:
        - Collections
      summary: Check payment status
      description: Check the state of a collection invoice.
      operationId: payment_status_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentStatus'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResults'
components:
  schemas:
    PaymentStatus:
      required:
        - invoice_id
      type: object
      properties:
        invoice_id:
          title: Invoice id
          type: string
          minLength: 1
        checkout_id:
          title: Checkout id
          type: string
          nullable: true
        signature:
          title: Signature
          type: string
          nullable: true
    PaymentResults:
      required:
        - invoice
        - meta
      type: object
      properties:
        invoice:
          $ref: '#/components/schemas/InvoicesSer'
        meta:
          $ref: '#/components/schemas/PaymentSessionsMinSer'
    InvoicesSer:
      required:
        - provider
        - value
      type: object
      properties:
        invoice_id:
          title: Invoice id
          type: string
          readOnly: true
        state:
          title: State
          type: string
          enum:
            - PENDING
            - PROCESSING
            - FAILED
            - CANCELED
            - PARTIAL
            - COMPLETE
            - RETRY
        provider:
          title: Provider
          type: string
          enum:
            - M-PESA
            - PESALINK
        charges:
          title: Charges
          type: string
          format: decimal
        net_amount:
          title: Net amount
          type: string
          readOnly: true
        currency:
          title: Currency
          type: string
          readOnly: true
        value:
          title: Value
          type: string
          format: decimal
        account:
          title: Account
          description: Depositing account, email or phone number
          type: string
          maxLength: 140
          nullable: true
        api_ref:
          title: Api ref
          description: API tracking reference number
          type: string
          pattern: ^[a-zA-Z0-9-_ ]+$
          maxLength: 140
          nullable: true
        clearing_status:
          title: Clearing status
          type: string
          readOnly: true
        mpesa_reference:
          title: Mpesa reference
          type: string
          readOnly: true
        host:
          title: Host
          description: Payment origin host i.e domain making the payment
          type: string
          pattern: ^[a-zA-Z0-9-_./=:?# ]+$
          maxLength: 200
          nullable: true
        retry_count:
          title: Retry count
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        failed_reason:
          title: Failed reason
          type: string
          nullable: true
        failed_code:
          title: Failed code
          type: string
          maxLength: 45
          nullable: true
        failed_code_link:
          title: Failed code link
          type: string
          readOnly: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
          nullable: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
          nullable: true
    PaymentSessionsMinSer:
      required:
        - customer
        - payment_link
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
        customer:
          $ref: '#/components/schemas/PaymentCustomersSer'
        payment_link:
          $ref: '#/components/schemas/PaymentLinksSer'
        customer_comment:
          title: Customer comment
          type: string
          pattern: ^[a-zA-Z0-9-_ ]+$
          nullable: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
          nullable: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
          nullable: true
    PaymentCustomersSer:
      type: object
      properties:
        customer_id:
          title: Customer id
          type: string
          readOnly: true
        phone_number:
          title: Phone number
          type: string
          pattern: ^[0-9-_+ ]+$
          maxLength: 20
          nullable: true
        email:
          title: Email
          type: string
          format: email
          maxLength: 254
          nullable: true
        first_name:
          title: First name
          type: string
          pattern: ^[a-zA-Z0-9-_ ]+$
          maxLength: 45
          nullable: true
        last_name:
          title: Last name
          type: string
          pattern: ^[a-zA-Z0-9-_ ]+$
          maxLength: 45
          nullable: true
        country:
          title: Country
          type: string
          pattern: ^[a-zA-Z0-9-_ ]+$
          maxLength: 2
          nullable: true
        zipcode:
          title: Zipcode
          type: string
          pattern: ^[a-zA-Z0-9-_ ]+$
          maxLength: 10
          nullable: true
        provider:
          title: Provider
          type: string
          enum:
            - M-PESA
            - PESALINK
          nullable: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
          nullable: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
          nullable: true
    PaymentLinksSer:
      required:
        - title
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
        title:
          title: Title
          description: Payment link title
          type: string
          pattern: ^[a-zA-Z0-9-_ ]+$
          maxLength: 140
          minLength: 1
        is_active:
          title: Is active
          type: boolean
        redirect_url:
          title: Redirect url
          description: >-
            Optional website URL to redirect the client after a successful
            payment
          type: string
          format: uri
          maxLength: 400
          nullable: true
        amount:
          title: Amount
          type: integer
          default: 0
          minimum: 0
        usage_limit:
          title: Usage limit
          type: integer
          default: 0
          minimum: 0
        qrcode_file:
          title: Qrcode file
          type: string
          readOnly: true
          format: uri
          nullable: true
        url:
          title: Url
          type: string
          readOnly: true
        currency:
          title: Currency
          type: string
          enum:
            - KES
            - USD
            - EUR
            - GBP
        mobile_tarrif:
          title: Mobile tarrif
          type: string
          enum:
            - BUSINESS-PAYS
            - CUSTOMER-PAYS
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
          nullable: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
          nullable: true
  securitySchemes:
    SecretAPIKeyScheme:
      type: http
      scheme: bearer
      description: Use your KulmiPay secret key as the Bearer token.
      x-default: ISSecretKey_test_xxxxxxxxxxxxxxxx

````