> ## 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 Orange Money in Côte d'Ivoire

> Charge an XOF Orange Money customer in Côte d'Ivoire using a 4-digit temporary authorisation code.

Use this recipe to collect an `XOF` mobile money payment from an Orange Money customer in Côte
d'Ivoire.

This differs from a normal mobile money charge: the customer must generate a **temporary
authorisation code before** you create the charge. You send that code as `otpCode`.

## Step 1. Show the customer authorisation instructions

```text Customer copy theme={null}
1. Open your phone dialer and call #144*82#.
2. Enter your Orange Money PIN only in the Orange Money prompt.
3. You will receive a 4-digit temporary code by SMS.
4. Enter that code here and click Pay now.

Do not enter your Orange Money PIN in this checkout.
```

<Warning>
  The customer's PIN belongs only in the Orange Money prompt. Zerocash needs the temporary
  authorisation code, never the PIN.
</Warning>

## Step 2. Choose the operator code

Orange Money in Côte d'Ivoire is `orange`. Confirm against
[mobile money operators](/guides/mobile-money-operators) and send it as `momoOperatorId`.

## Step 3. Create the charge with `otpCode`

<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": 1000,
      "currency": "XOF",
      "phoneNumber": "2250700000000",
      "momoOperatorId": "orange",
      "externalReference": "order_orange_ci_12345",
      "otpCode": "1234"
    }'
  ```

  ```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 collectOrangeMoneyCoteDIvoire({ amount, phoneNumber, otpCode, 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: "XOF",
        phoneNumber,
        momoOperatorId: "orange",
        externalReference,
        otpCode,
      },
      { headers },
    );

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

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

  collectOrangeMoneyCoteDIvoire({
    amount: 1000,
    phoneNumber: "2250700000000",
    otpCode: "1234",
    externalReference: "order_orange_ci_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"
}
```

A successful response means accepted for processing, not that the customer has paid. Store the
`transactionId` and your `externalReference` for reconciliation.

## Step 4. Confirm the final status

```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                                                                              |
| :------------------------------------- | :----------------------------------------------------------------------------------------- |
| `Otp code is required`                 | The provider requires `otpCode` — collect the temporary authorisation code first.          |
| Invalid or failed charge               | Confirm the customer entered the **current** 4-digit code from `#144*82#`. Codes expire.   |
| Customer asks where to enter their PIN | Only in the Orange Money prompt, never in your checkout.                                   |
| Operator not found                     | Confirm the Orange Money code in [mobile money operators](/guides/mobile-money-operators). |
| Transaction remains pending            | Wait for webhook updates or poll the transaction. Do not fulfil until final success.       |
