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

# Mobile Money - MOMO

> Collect payments through mobile money operators across supported markets.

**Ideal for**: Markets where mobile wallets dominate. The customer approves the charge on their phone with their operator.

Mobile money is an e-wallet payment method in Africa which allows you to accept payments from your customers with their mobile money wallets

Mobile Money payment method is available to customers in Ghana, Kenya, Uganda, Tanzania, Senegal, Burkina Faso, Ivory Coast, Cameroon, and Mali

## How it works

1. To initiate a mobile money transaction, make a request to the mobile money service with the payments/initiates endpoint.
2. When the request is made you are expected to get a "Transaction in progress" response with a code INP from SeerBit.
3. Once the customer authorises the transaction from his mobile device, you will be notified via webhook with the final status of the transaction or requery the verify payment enpoint.
4. Verify the payment

## Before you use these endpoints

These endpoints are for merchants who want to **build their own checkout**. You collect the payment details in your own interface and send them to SeerBit, deciding for yourself how the payment experience looks.

If you would rather not build and maintain that, use [Simple Checkout](/online-payments/integrations/simple-checkout) or [Standard Checkout](/online-payments/integrations/standard-checkout) instead — SeerBit renders the payment interface, supports every method, and takes on the compliance burden.

### You calculate the fee, not SeerBit

The hosted checkout works out the transaction fee and shows it to the customer. **These endpoints do not.** SeerBit charges exactly the `amount` you send.

So if your dashboard is set so the **customer** bears the fee, you must calculate that fee and include it yourself. If you don't, the fee comes out of your settlement instead — you will receive less than you charged.

| Fee bearer | [Hosted checkout](/online-payments/integrations/standard-checkout#transaction-fees) | These endpoints |
| - | - | - |
| **Merchant** | Send your amount; the fee is deducted at settlement | Send your amount; the fee is deducted at settlement |
| **Customer** | Checkout adds the fee for you | **You add the fee yourself** |

Set the fee bearer in your dashboard settings, and see [transaction fees](/online-payments/integrations/standard-checkout#transaction-fees) for how the two models differ.

## How methods are selected

Every payment method uses the **same endpoint** — what changes is the `paymentType` you send and the extra fields that method needs.

```bash theme={null}
POST https://seerbitapi.com/api/v2/payments/initiates
```

| Method | `paymentType` | Extra fields |
| - | - | - |
| [Card](/payment-methods/card-payment) | `CARD` | `cardNumber`, `cvv`, `expiryMonth`, `expiryYear`, `pin` |
| [Transfer](/payment-methods/transfer) | `TRANSFER` | — |
| [USSD](/payment-methods/ussd-payment) | `USSD` | `bankCode` |
| [Mobile money](/payment-methods/mobile-money) | `MOMO` | `network`, `voucherCode` |
| [Bank account](/payment-methods/bank-account) | `ACCOUNT` | `clientAppCode`, `redirectUrl` |

## Authentication

All payment method calls are authenticated with a **bearer token**, generated from your public and secret keys.

```bash theme={null}
POST https://seerbitapi.com/api/v2/encrypt/keys
```

<Card title="Authentication" icon="key" href="/authentication#bearer-token">
  How to generate the token, and which credential every other SeerBit API expects.
</Card>

## Initializing a MOMO Payment

For the full specification, see our [API Reference](/api-reference)

<Badge color="blue">POST</Badge>

```bash theme={null}
https://seerbitapi.com/api/v2/payments/initiates
```

### Request Sample

The code snippet below shows an example request for initialising this payment

<CodeGroup>
  ```bash cURL theme={null}
  curl --location 'https://seerbitapi.com/api/v2/payments/initiates' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_ENCRYPTED_KEY' \
  --data-raw '{
    "fullName":"FirstName LastName",
    "email":"firstname@mail.com",
    "mobileNumber":"23309494949498",
    "publicKey":"merchant_publicKey",
    "paymentReference": "MOMOTYTSF4VA",
    "deviceType":"nokia 3310",
    "sourceIP":"1.0.1.0",
    "currency": "UGX",
    "productDescription": "snacks",
    "country": "UG",
    "fee": "1.00",
    "network":"MTN",
    "voucherCode":"",
    "amount": "10.01",
    "paymentType": "MOMO"
  }'
  ```

  ```javascript NODE theme={null}
  var request = require('request');
  var options = {
    method: 'POST',
    url: 'https://seerbitapi.com/api/v2/payments/initiates',
    headers: {
      'Content-Type': 'application/json',
      Authorization: 'Bearer YOUR_ENCRYPTED_KEY'
    },
    body: '{   \n  "fullName":"FirstName LastName",\n  "email":"firstname@mail.com",\n  "mobileNumber":"23309494949498",\n  "publicKey":"merchant_publicKey",\n  "paymentReference": "MOMOTYTSF4VA",\n  "deviceType":"nokia 3310",\n  "sourceIP":"1.0.1.0",\n  "currency": "UGX",\n  "productDescription": "snacks",\n  "country": "UG",\n  "fee": "1.00",\n  "network":"MTN",\n  "voucherCode":"",\n  "amount": "10.01",\n}'
  };
  request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
  });
  ```

  ```php PHP theme={null}
  <?php

  $curl = curl_init();

  curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://seerbitapi.com/api/v2/payments/initiates',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS =>'{
    "fullName":"FirstName LastName",
    "email":"firstname@mail.com",
    "mobileNumber":"23309494949498",
    "publicKey":"merchant_publicKey",
    "paymentReference": "MOMOTYTSF4VA",
    "deviceType":"nokia 3310",
    "sourceIP":"1.0.1.0",
    "currency": "UGX",
    "productDescription": "snacks",
    "country": "UG",
    "fee": "1.00",
    "network":"MTN",
    "voucherCode":"",
    "amount": "10.01",
    "paymentType": "MOMO"
  }',
    CURLOPT_HTTPHEADER => array(
      'Content-Type: application/json',
      'Authorization: Bearer YOUR_ENCRYPTED_KEY'
    ),
  ));

  $response = curl_exec($curl);

  curl_close($curl);
  echo $response;
  ```
</CodeGroup>

### Response Sample

The code snippet below shows an example request for initialising this payment

```json theme={null}
{
  "status": "SUCCESS",
  "data": {
    "code": "INP",
    "payments": {
      "paymentReference": "O67456S537798799QWEWAT0MPTYP",
      "linkingReference": "CF323190231596441884237"
    },
    "message": "Kindly Enter Otp"
  }
}
```

> Current providers for MOMO providers are : **MTN**, **Airtel/Tigo** and **Vodafone**.

## Testing MOMO Payment

Create a MOMO transaction following the steps above.

* Numbers and OTP
  Number: `23309494949494` `23309494949495`<br />
  OTP: `349275`
* Number only OTP not required
  Number: `3309494949494` `23309494949495`


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