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

# Collect Africell mobile money in The Gambia or DR Congo

> Charge an Africell customer in GMD or CDF, where they confirm from a USSD menu after you create the charge.

<Info>
  Use this recipe for Africell mobile money in supported markets:

  | Country           | Currency |
  | :---------------- | :------- |
  | The Gambia (`GM`) | `GMD`    |
  | DR Congo (`CD`)   | `CDF`    |
</Info>

This differs from a normal instant-confirmation flow: the customer must confirm the payment from
their phone **after** you create the charge.

## Step 1. Show the customer confirmation instructions

Display something like this after they click **Pay now**:

```text Customer copy theme={null}
1. Dial *777*7*3# on your phone.
2. Enter your Afrimoney secret code only in the Africell prompt.
3. Select the transaction from the menu.
4. Choose option 1 to confirm the transaction.
```

<Warning>
  Do not ask the customer to enter their Afrimoney secret code in your checkout. It belongs only in
  the Africell prompt.
</Warning>

## Step 2. Choose the operator code

For The Gambia and DR Congo, Africell is `africell`. Confirm against
[mobile money operators](/guides/mobile-money-operators) and send it as `momoOperatorId`.

## Step 3. Create the charge

Create the charge **before** showing the customer the confirmation instructions.

<CodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url "https://api.zerocash.tech/api/b2b/fiat/deposit/momo" \
    --header "Authorization: Bearer $ZEROCASH_TOKEN" \
    --header "content-type: application/json" \
    --data '{
      "amount": 100,
      "currency": "GMD",
      "phoneNumber": "2207000000",
      "momoOperatorId": "africell",
      "externalReference": "order_africell_gm_12345"
    }'
  ```

  ```javascript Node.js theme={null}
  const axios = require("axios");

  const ZEROCASH_TOKEN = process.env.ZEROCASH_TOKEN;
  const BASE_URL = "https://api.zerocash.tech/api/b2b";

  async function collectAfricellMobileMoney({
    amount,
    currency,
    phoneNumber,
    externalReference,
  }) {
    const headers = {
      accept: "application/json",
      "content-type": "application/json",
      Authorization: `Bearer ${ZEROCASH_TOKEN}`,
    };

    const chargeResponse = await axios.post(
      `${BASE_URL}/fiat/deposit/momo`,
      {
        amount,
        currency,
        phoneNumber,
        momoOperatorId: "africell",
        externalReference,
      },
      { headers },
    );

    const transactionId = chargeResponse.data.transactionId;
    const transactionResponse = await axios.get(
      `${BASE_URL}/transactions/${transactionId}`,
      { headers },
    );

    return {
      charge: chargeResponse.data,
      transaction: transactionResponse.data,
    };
  }

  collectAfricellMobileMoney({
    amount: 100,
    currency: "GMD",
    phoneNumber: "2207000000",
    externalReference: "order_africell_gm_12345",
  })
    .then(console.log)
    .catch((error) => {
      console.error(error.response?.data || error.message);
    });
  ```
</CodeGroup>

```json Response theme={null}
{
  "success": true,
  "message": "Initiated request.",
  "transactionId": "123456789"
}
```

<Warning>
  A successful API response means the charge was accepted for processing. It does **not** mean the
  customer has confirmed the payment.
</Warning>

## Step 4. Confirm the final status

Wait for a `transaction_updated` webhook, or query the transaction:

```bash theme={null}
curl --request GET \
  --url "https://api.zerocash.tech/api/b2b/transactions/123456789" \
  --header "Authorization: Bearer $ZEROCASH_TOKEN" \
  --header "accept: application/json"
```

Only fulfil the order once the transaction reaches a successful final state.

## Step 5. Handle common issues

| Issue                                     | What to check                                                                                                          |
| :---------------------------------------- | :--------------------------------------------------------------------------------------------------------------------- |
| Customer did not see prompt               | Ask them to dial `*777*7*3#` and select the transaction from the menu.                                                 |
| Customer asks where to enter their secret | Only in the Africell prompt — never in your checkout.                                                                  |
| Operator not found                        | Confirm the Africell code in [mobile money operators](/guides/mobile-money-operators) and send it as `momoOperatorId`. |
| Transaction remains pending               | Wait for webhook updates or poll the transaction. Do not fulfil until final success.                                   |
