> ## 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.

# Create a service

> Creates a service: one app, website or business activity that collects payments on its own, with its own
balances. The service starts in `pending_review` while our team checks it. In test mode (`sk_test_`) you can
collect right away; in live mode the service must be `active`.

**The `webhook_secret` is returned only in this response.** Store it: you need it to verify our webhooks.




## OpenAPI

````yaml /openapi.yaml post /mobile-money/services
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/services:
    post:
      tags:
        - Services
      summary: Create a service
      description: >
        Creates a service: one app, website or business activity that collects
        payments on its own, with its own

        balances. The service starts in `pending_review` while our team checks
        it. In test mode (`sk_test_`) you can

        collect right away; in live mode the service must be `active`.


        **The `webhook_secret` is returned only in this response.** Store it:
        you need it to verify our webhooks.
      operationId: createService
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateServiceRequest'
      responses:
        '201':
          description: Service created, waiting for review
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/ServiceWithSecret'
                  meta:
                    $ref: '#/components/schemas/Meta'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    CreateServiceRequest:
      type: object
      required:
        - name
        - category
        - description
        - url
        - support_email
        - support_phone
        - webhook_url
      properties:
        name:
          type: string
          description: 2 to 60 characters, unique among your services.
          example: Afroyamo
        category:
          type: string
          description: A `code` from `GET /mobile-money/categories`.
          example: dating
        description:
          type: string
          description: 20 to 1,000 characters. What you sell and to whom.
          example: >-
            Dating app for the African diaspora. Premium subscriptions paid by
            mobile money.
        url:
          type: string
          format: uri
          description: The public address of your website or app.
          example: https://afroyamo.com
        support_email:
          type: string
          format: email
          description: Where your customers can reach you.
          example: support@afroyamo.com
        support_phone:
          type: string
          description: International format with the country code.
          example: '+237670000000'
        webhook_url:
          type: string
          format: uri
          description: '**https** address of your server that receives the payment results.'
          example: https://api.afroyamo.com/kemypay/webhooks
        callback_url:
          type: string
          format: uri
          description: Optional. Where your customer is sent back after paying.
          example: https://afroyamo.com/payment/done
        fee_bearer:
          type: string
          enum:
            - merchant
            - customer
          default: merchant
          description: >-
            Who pays the fee: `merchant` (deducted from what you receive) or
            `customer` (added to the price).
    ServiceWithSecret:
      allOf:
        - $ref: '#/components/schemas/Service'
        - type: object
          properties:
            webhook_secret:
              type: string
              description: Shown only now. Used to verify the signature of our webhooks.
              example: >-
                whsec_5f2c0a9e7b1d4c3a8e6f0b2d9c7a1e4f5b8d3c6a9e2f1b4d7c0a3e6f9b2d5c8a
    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
    Service:
      type: object
      properties:
        code:
          type: string
          format: uuid
          example: 019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47
        name:
          type: string
          example: Afroyamo
        category:
          type: object
          properties:
            code:
              type: string
              example: dating
            name:
              type: string
              example: Dating & social apps
        description:
          type: string
          example: >-
            Dating app for the African diaspora. Premium subscriptions paid by
            mobile money.
        url:
          type: string
          example: https://afroyamo.com
        support_email:
          type: string
          example: support@afroyamo.com
        support_phone:
          type: string
          example: '+237670000000'
        status:
          type: string
          enum:
            - pending_review
            - active
            - rejected
            - suspended
            - disabled
          example: pending_review
        fee_bearer:
          type: string
          enum:
            - merchant
            - customer
          example: merchant
        webhook_url:
          type: string
          example: https://api.afroyamo.com/kemypay/webhooks
        callback_url:
          type:
            - string
            - 'null'
          example: null
        review_reason:
          type:
            - string
            - 'null'
          description: Why the service was rejected or suspended.
          example: null
        created_at:
          type: string
          format: date-time
          example: '2026-10-29T10:00:00+00:00'
        reviewed_at:
          type:
            - string
            - 'null'
          format: date-time
          example: null
    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'
  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.