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



## OpenAPI

````yaml /openapi/payments.yaml post /checkout/sessions/{sessionId}/pay
openapi: 3.0.3
info:
  title: Simiz Payments API
  version: 2024-01
  description: >
    The Simiz Payments API lets you accept Mobile Money payments in Central and
    West Africa.


    ## Authentication


    All payment endpoints require a Bearer token using your API key:


    ```

    Authorization: Bearer smz_test_sk_xxx

    ```


    Checkout **public** endpoints (retrieve, pay, status, cancel) require no
    authentication — they are accessed by the end customer.


    ## Environments


    | Environment | Base URL | API Key Prefix |

    |-------------|----------|----------------|

    | **Sandbox** | `https://sandbox.api.simiz.io/v1` | `smz_test_` |

    | **Production** | `https://api.simiz.io/v1` | `smz_live_` |


    ## Idempotency


    For `POST` requests, include an `Idempotency-Key` header to safely retry
    requests without creating duplicate resources. Keys expire after 24 hours.
  contact:
    name: Simiz Support
    email: developer@simiz.io
    url: https://simiz.io/docs
  license:
    name: Proprietary
    url: https://simiz.io/legal/terms
servers:
  - url: https://api.simiz.io/v1
    description: Production — use smz_live_ keys
  - url: https://sandbox.api.simiz.io/v1
    description: Sandbox — use smz_test_ keys
security: []
tags:
  - name: Payments
    description: >
      Create and manage payment transactions. A transaction represents a single
      payment from a customer via Mobile Money. Authenticated with API key.
  - name: Checkout (Public)
    description: >
      Public checkout endpoints used by the payment page on the customer side.
      No authentication required.
  - name: Payment Links (Public)
    description: >
      Public payment link resolution. These endpoints are used by the hosted
      payment page when a customer opens a payment link. **No authentication
      required.**
paths:
  /checkout/sessions/{sessionId}/pay:
    post:
      tags:
        - Checkout (Public)
      summary: Initiate payment
      description: >
        Start the Mobile Money payment process for an existing checkout session.

        The customer will receive a USSD notification on their phone. **No
        authentication required.**
      operationId: initiateCheckoutPayment
      parameters:
        - $ref: '#/components/parameters/SessionId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitiatePaymentBody'
            example:
              paymentMethod: ORANGE_MONEY
              phone: '237670000001'
      responses:
        '201':
          description: Payment initiated — awaiting USSD confirmation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutSession'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
      security: []
components:
  parameters:
    SessionId:
      name: sessionId
      in: path
      required: true
      description: 'Checkout session ID (format: cs_xxx)'
      schema:
        type: string
        example: cs_abc123
  schemas:
    InitiatePaymentBody:
      type: object
      required:
        - paymentMethod
        - phone
      properties:
        paymentMethod:
          $ref: '#/components/schemas/CheckoutPaymentMethod'
        phone:
          type: string
          description: Phone number in international format (e.g. 237670000001)
          example: '237670000001'
    CheckoutSession:
      type: object
      properties:
        id:
          type: string
          description: Checkout session ID
          example: cs_abc123
        url:
          type: string
          format: uri
          description: Payment URL for the customer
          example: https://pay.simiz.io/cs/abc123
        amount:
          type: number
          example: 5000
        currency:
          type: string
          example: XAF
        description:
          type: string
          nullable: true
        status:
          $ref: '#/components/schemas/CheckoutSessionStatus'
        expiresAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        merchantName:
          type: string
        merchantLogo:
          type: string
          format: uri
          nullable: true
        successUrl:
          type: string
          format: uri
        cancelUrl:
          type: string
          format: uri
        paymentMethod:
          $ref: '#/components/schemas/CheckoutPaymentMethod'
        paymentId:
          type: string
          nullable: true
          description: Payment ID once payment is initiated
        customer:
          type: object
          nullable: true
          properties:
            email:
              type: string
            phone:
              type: string
    CheckoutPaymentMethod:
      type: string
      enum:
        - ORANGE_MONEY
        - MTN_MOMO
        - WAVE
        - MOOV_MONEY
      description: |
        Checkout-specific payment methods (broader than core):
        - `ORANGE_MONEY`, `MTN_MOMO`, `WAVE`, `MOOV_MONEY`
    CheckoutSessionStatus:
      type: string
      enum:
        - idle
        - processing
        - pending_ussd
        - success
        - failed
        - expired
        - cancelled
      description: |
        Checkout session lifecycle:
        - `idle` — Session created, waiting for payment initiation
        - `processing` — Payment being processed
        - `pending_ussd` — Waiting for USSD confirmation from payer
        - `success` — Payment completed
        - `failed` — Payment failed
        - `expired` — Session expired
        - `cancelled` — Session cancelled
    ApiError:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            statusCode: 400
            message: amount must not be less than 100
            error: Bad Request
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            statusCode: 404
            message: Payment not found
            error: Not Found

````