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

# Collect payment

> Initiate a payment collection through M-Pesa or PesaLink.



## OpenAPI

````yaml /openapi.yml post /payment/collection
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/collection:
    post:
      tags:
        - Collections
      summary: Collect payment
      description: Initiate a payment collection through M-Pesa or PesaLink.
      operationId: collect_payment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - method
                - currency
                - amount
                - api_ref
              properties:
                method:
                  type: string
                  enum:
                    - M-PESA
                    - PESALINK
                currency:
                  type: string
                  example: KES
                amount:
                  type: string
                  example: '1500.00'
                api_ref:
                  type: string
                phone_number:
                  type: string
                email:
                  type: string
                first_name:
                  type: string
                last_name:
                  type: string
                public_key:
                  type: string
                wallet_id:
                  type: string
                mobile_tarrif:
                  type: string
                  enum:
                    - BUSINESS-PAYS
                    - CUSTOMER-PAYS
                bank_tarrif:
                  type: string
                  enum:
                    - BUSINESS-PAYS
                    - CUSTOMER-PAYS
      responses:
        '201':
          description: Collection created
          content:
            application/json:
              schema:
                type: object
                properties:
                  invoice:
                    type: object
                  signature:
                    type: string
components:
  securitySchemes:
    SecretAPIKeyScheme:
      type: http
      scheme: bearer
      description: Use your KulmiPay secret key as the Bearer token.
      x-default: ISSecretKey_test_xxxxxxxxxxxxxxxx

````