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

# Quote a payment (beta)

> Prices a payment before you request it, at your price: what your customer pays, the fee and what you receive,
depending on who pays the fee. Nothing is created.




## OpenAPI

````yaml /openapi.yaml post /mobile-money/quote
openapi: 3.1.0
info:
  title: KemyPay API
  version: '1.0'
  description: >
    KemyPay lets you collect mobile money payments in 12 African countries
    through one API, with one balance per

    service, country and currency.


    Every request is authenticated with a secret API key (`sk_live_…` or
    `sk_test_…`) and must come from one of

    your allowed IP addresses. Responses use the same envelope: `{ "success":
    true, "data": …, "meta": … }`, or

    `{ "success": false, "error": { "code", "message", "details" }, "meta": …
    }`.


    Collections, quotes and operator prediction are in **beta**: they are being
    rolled out in production.
  contact:
    name: KemyPay Support
    email: hi@kemypay.com
servers:
  - url: https://api.kemypay.com/v1
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Catalog
    description: Countries, operators, prices and service categories
  - name: Services
    description: Your services (one per app or business activity), validated by our team
  - name: Collections
    description: Collect a payment from a customer's mobile money account (beta)
  - name: Balances
    description: One balance per service, country and currency
paths:
  /mobile-money/quote:
    post:
      tags:
        - Collections
      summary: Quote a payment (beta)
      description: >
        Prices a payment before you request it, at your price: what your
        customer pays, the fee and what you receive,

        depending on who pays the fee. Nothing is created.
      operationId: quoteCollection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteRequest'
      responses:
        '200':
          description: The price of the payment
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/Quote'
                  meta:
                    $ref: '#/components/schemas/Meta'
        '422':
          $ref: '#/components/responses/ValidationError'
        '503':
          $ref: '#/components/responses/OperatorUnavailable'
components:
  schemas:
    QuoteRequest:
      type: object
      required:
        - operator
        - currency
        - amount
      properties:
        operator:
          type: string
          example: MTN_CMR
        currency:
          type: string
          example: XAF
        amount:
          type: string
          description: The value of the goods.
          example: '1000'
        fee_bearer:
          type: string
          enum:
            - merchant
            - customer
          description: 'Default: the setting of `service`, or `merchant`.'
        service:
          type: string
          format: uuid
          description: Optional. Uses the `fee_bearer` of this service.
    Quote:
      type: object
      properties:
        operator:
          type: string
          example: MTN_CMR
        country:
          type: string
          example: CMR
        currency:
          type: string
          example: XAF
        fee_bearer:
          type: string
          example: customer
        value:
          type: string
          example: '1000'
        customer_pays:
          type: string
          example: '1033'
        fee:
          type: string
          example: '33'
        merchant_receives:
          type: string
          example: '1000'
        within_limits:
          type: boolean
          description: >-
            `false` if `customer_pays` is outside the minimum and maximum of the
            operator.
          example: true
    Meta:
      type: object
      properties:
        request_id:
          type: string
          example: a4f8e2c1b3d97056
        timestamp:
          type: string
          format: date-time
          example: '2026-10-29T10:00:00+00:00'
        mode:
          type: string
          enum:
            - test
            - live
          example: live
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              example: VALIDATION_ERROR
            message:
              type: string
              example: Some fields of the payment are missing or invalid.
            details:
              type: object
              additionalProperties: true
              example:
                phone_number: >-
                  Required: the mobile money number with the country code,
                  digits only, for example 237670000000.
        meta:
          $ref: '#/components/schemas/Meta'
  responses:
    ValidationError:
      description: >-
        `VALIDATION_ERROR`: one or more fields are missing or invalid. `details`
        explains each field.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    OperatorUnavailable:
      description: >-
        `OPERATION_FAILED`: the operator is closed for collections right now.
        Offer another operator.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error:
              code: OPERATION_FAILED
              message: >-
                ORANGE_CMR is temporarily unavailable for collections. Offer
                another operator or try again later.
              details:
                failure_code: operator_unavailable
            meta:
              request_id: a4f8e2c1b3d97056
              timestamp: '2026-10-29T10:00:00+00:00'
              mode: live
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your secret API key: `sk_live_…` (real money) or `sk_test_…` (test
        mode).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.