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

# Initiate a premium payment (M-Pesa STK push)

> Rate limited to 10 requests/hour. `reference` is the policy id (`policyId` is accepted as a legacy alias; if both are sent they must match). TIER-GATED: on a policy whose frozen settlementMode is DETERMINATION this returns 403 TIER_NOT_ENTITLED before any transaction row is written and before any STK push is sent — use PUT /policies/{policyId}/activate instead.



## OpenAPI

````yaml /api-reference/openapi.json post /payments/initiate
openapi: 3.1.0
info:
  title: MicroCrop Partner API
  version: 1.0.0
  description: >-
    Parametric crop & livestock insurance API for integrating partners. All
    requests authenticate with an organization API key in the `x-api-key`
    header.
servers:
  - url: https://app.microcrop.app/api
    description: Production (Base mainnet)
security:
  - apiKey: []
tags:
  - name: Farmers
  - name: Plots
  - name: Herds
  - name: Policies
  - name: Payments
  - name: Payouts
  - name: Organization
  - name: Determinations
paths:
  /payments/initiate:
    post:
      tags:
        - Payments
      summary: Initiate a premium payment (M-Pesa STK push)
      description: >-
        Rate limited to 10 requests/hour. `reference` is the policy id
        (`policyId` is accepted as a legacy alias; if both are sent they must
        match). TIER-GATED: on a policy whose frozen settlementMode is
        DETERMINATION this returns 403 TIER_NOT_ENTITLED before any transaction
        row is written and before any STK push is sent — use PUT
        /policies/{policyId}/activate instead.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - reference
                - amount
                - phoneNumber
              properties:
                reference:
                  type: string
                  format: uuid
                  description: Policy id.
                amount:
                  type: number
                  description: Local currency; must be ≥ the quoted premium.
                phoneNumber:
                  type: string
                  description: 'E.164-ish: 9-15 digits, optional leading ''+''.'
                  example: '+254712345678'
      responses:
        '200':
          description: Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentInitiateEnvelope'
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    PaymentInitiateEnvelope:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            transactionId:
              type: string
            reference:
              type: string
              format: uuid
            orderId:
              type: string
            provider:
              type: string
            status:
              type: string
              example: PENDING
            instructions:
              type: string
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              example: INVALID_INPUT
            message:
              type: string
            details: {}
  responses:
    BadRequest:
      description: Validation or business-rule error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````