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

# Initiate Payment

Initiate a payment transaction.

<ParamField body="amount" type="number" required>
  Payment amount
</ParamField>

<ParamField body="currency" type="string" required>
  Currency code (e.g., USD)
</ParamField>

<ParamField body="payment_method" type="string" required>
  Payment method (mobile\_money, card)
</ParamField>

<ParamField body="provider" type="string">
  Payment provider (mpesa, tigopesa, etc.)
</ParamField>

<ParamField body="phone_number" type="string">
  Phone number for mobile money payments
</ParamField>

<Warning>
  Requires authentication. Include the access token in the Authorization header.
</Warning>

## Request Example

<RequestExample>
  ```json theme={null}
  {
    "amount": 50.00,
    "currency": "USD",
    "payment_method": "mobile_money",
    "provider": "mpesa",
    "phone_number": "+255614853618"
  }
  ```
</RequestExample>

## Success Response (201)

<ResponseField name="success" type="boolean">
  Operation success status
</ResponseField>

<ResponseField name="transaction" type="object">
  Transaction object
</ResponseField>

<ResponseField name="transaction.id" type="string">
  Transaction ID
</ResponseField>

<ResponseField name="transaction.order_id" type="string">
  Order ID
</ResponseField>

<ResponseField name="transaction.amount" type="float">
  Transaction amount
</ResponseField>

<ResponseField name="transaction.currency" type="string">
  Currency code
</ResponseField>

<ResponseField name="transaction.status" type="string">
  Transaction status
</ResponseField>

<ResponseField name="transaction.payment_url" type="string">
  Payment URL for redirect
</ResponseField>

<ResponseField name="transaction.expires_at" type="string">
  Expiration timestamp (ISO 8601)
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "transaction": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "order_id": "ORD-1234567890",
      "amount": 50.00,
      "currency": "USD",
      "status": "pending",
      "payment_url": "https://payment.gateway.com/pay/xyz123",
      "expires_at": "2025-11-27T11:00:00Z"
    }
  }
  ```
</ResponseExample>
