> ## 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 get /payments/{token}
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:
  /payments/{token}:
    get:
      tags:
        - Payments
      summary: Retrieve a payment
      description: >-
        Fetch the details of a specific payment by its unique token (returned at
        creation).
      operationId: getPayment
      parameters:
        - name: token
          in: path
          required: true
          description: Unique payment token (e.g. `pay_abc123xyz789`)
          schema:
            type: string
            example: pay_abc123xyz789
        - name: expand[]
          in: query
          description: Expand inline relations
          schema:
            type: array
            items:
              type: string
              enum:
                - customer
                - project
                - refunds
                - events
      responses:
        '200':
          description: Payment details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transaction'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Transaction:
      type: object
      properties:
        id:
          type: string
          format: uuid
        token:
          type: string
          description: Unique payment token
          example: pay_abc123xyz789
        projectId:
          type: string
          format: uuid
        reference:
          type: string
          nullable: true
        amount:
          type: number
          example: 5000
        currency:
          type: string
          example: XAF
        status:
          $ref: '#/components/schemas/TransactionStatus'
        paymentMethod:
          $ref: '#/components/schemas/PaymentMethod'
        paymentUrl:
          type: string
          format: uri
          nullable: true
          description: URL to redirect the customer for payment
        payerPhone:
          type: string
          nullable: true
        payerName:
          type: string
          nullable: true
        payerEmail:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        livemode:
          type: boolean
          description: Whether this is a production transaction
        createdAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
          nullable: true
    TransactionStatus:
      type: string
      enum:
        - PENDING
        - PROCESSING
        - COMPLETED
        - FAILED
        - CANCELLED
        - EXPIRED
        - REFUNDED
        - PARTIALLY_REFUNDED
      description: |
        Transaction lifecycle:
        - `PENDING` — Awaiting payer confirmation
        - `PROCESSING` — Payment being processed by provider
        - `COMPLETED` — Payment received successfully
        - `FAILED` — Payment failed
        - `CANCELLED` — Cancelled by merchant or payer
        - `EXPIRED` — Payer did not confirm in time
        - `REFUNDED` — Fully refunded
        - `PARTIALLY_REFUNDED` — Partially refunded
    PaymentMethod:
      type: string
      enum:
        - ORANGE_MONEY
        - MTN_MOMO
        - UNKNOWN
      description: |
        Payment methods supported:
        - `ORANGE_MONEY` — Orange Money
        - `MTN_MOMO` — MTN Mobile Money
        - `UNKNOWN` — Fallback / not yet determined
    ApiError:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            statusCode: 401
            message: Invalid or missing API key
            error: Unauthorized
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            statusCode: 404
            message: Payment not found
            error: Not Found
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key (smz_*)
      description: >
        Use your Simiz API key as the Bearer token.

        Keys starting with `smz_test_sk_` target sandbox, `smz_live_sk_` target
        production.

````