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

# Orange Money — Mali

> Integrate Orange Money Mali with the LigdiCash API. Validation mode: Operator redirect (Orange Money portal).

## Identity

| Field           | Value                                            |
| --------------- | ------------------------------------------------ |
| Country         | Mali                                             |
| Operator        | Orange Money Mali                                |
| `operator_id`   | `18`                                             |
| `operator_name` | `ORANGE MALI`                                    |
| Country code    | +223                                             |
| Number format   | `223XXXXXXXX` (no `+` or spaces)                 |
| Endpoint        | `POST /pay/v01/straight/checkout-invoice/create` |
| Validation mode | Operator redirect                                |

## Validation mode: Operator redirect

For Orange Money Mali, the LigdiCash integration goes through **the Orange Money web portal** to authenticate the customer. The flow is:

1. You call `/pay/v01/straight/checkout-invoice/create` with the customer's number.
2. LigdiCash responds with the transaction `token` and a `response_text` field containing **the Orange Money portal URL** (`https://mpayment.orange-money.com/ml/...`).
3. You redirect the customer's browser to that URL.
4. The customer authenticates and confirms the payment on the Orange portal.
5. LigdiCash notifies you of the final result via your `callback_url`.

<Warning>
  The customer's browser-side return after the Orange portal is not guaranteed — the user may close the tab, lose connectivity, or never return. **The callback remains the only source of truth.** Never validate the payment based on the customer's return alone.
</Warning>

<Note>
  This mode does use the `/straight/checkout-invoice/create` endpoint (direct payin), but the user journey includes an external redirect to the operator's portal. Do not confuse this with [hosted payin](/en/payment-api/hosted-payin/introduction), which uses the `/redirect/checkout-invoice/create` endpoint and exposes the LigdiCash payment page.
</Note>

## Recommended UX

<Steps>
  <Step title="Collect the customer's number">
    Your form only collects the Orange Money Mali phone number.
  </Step>

  <Step title="Submit the request">
    Request with the number in `customer` and `otp: ""`.
  </Step>

  <Step title="Retrieve the portal URL">
    In the response, the `response_text` field contains the Orange Money portal URL (`https://mpayment.orange-money.com/ml/...`).
  </Step>

  <Step title="Redirect the customer">
    Redirect the customer's browser to that URL. The customer authenticates on the Orange portal and confirms the payment.
  </Step>

  <Step title="Wait for the callback">
    The final result arrives via your `callback_url`. Show a waiting state until the callback arrives — do not rely on the browser-side return.
  </Step>
</Steps>

## Request example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://app.ligdicash.com/pay/v01/straight/checkout-invoice/create \
    -H "Apikey: {API_KEY}" \
    -H "Authorization: Bearer {API_TOKEN}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -d '{
      "commande": {
        "invoice": {
          "items": [],
          "total_amount": 5000,
          "devise": "XOF",
          "description": "Pro Subscription — January 2025",
          "customer": "22370000000",
          "customer_firstname": "Ibrahim",
          "customer_lastname": "Traoré",
          "customer_email": "ibrahim@example.com",
          "external_id": "",
          "otp": ""
        },
        "store": {
          "name": "MyApp",
          "website_url": "https://myapp.com"
        },
        "actions": {
          "cancel_url": "",
          "return_url": "",
          "callback_url": "https://myapp.com/api/callback/ligdicash"
        },
        "custom_data": {
          "transaction_id": "ORD-2025-00062"
        }
      }
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://app.ligdicash.com/pay/v01/straight/checkout-invoice/create",
    {
      method: "POST",
      headers: {
        Apikey: process.env.LIGDICASH_API_KEY,
        Authorization: `Bearer ${process.env.LIGDICASH_API_TOKEN}`,
        Accept: "application/json",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        commande: {
          invoice: {
            items: [],
            total_amount: 5000,
            devise: "XOF",
            description: "Pro Subscription — January 2025",
            customer: "22370000000",
            customer_firstname: "Ibrahim",
            customer_lastname: "Traoré",
            customer_email: "ibrahim@example.com",
            external_id: "",
            otp: "",
          },
          store: { name: "MyApp", website_url: "https://myapp.com" },
          actions: {
            cancel_url: "",
            return_url: "",
            callback_url: "https://myapp.com/api/callback/ligdicash",
          },
          custom_data: { transaction_id: "ORD-2025-00062" },
        },
      }),
    }
  );

  const data = await response.json();
  // Redirect the customer to the Orange portal
  window.location.href = data.response_text;
  ```

  ```php PHP theme={null}
  $payload = [
    "commande" => [
      "invoice" => [
        "items" => [],
        "total_amount" => 5000,
        "devise" => "XOF",
        "description" => "Pro Subscription — January 2025",
        "customer" => "22370000000",
        "customer_firstname" => "Ibrahim",
        "customer_lastname" => "Traoré",
        "customer_email" => "ibrahim@example.com",
        "external_id" => "",
        "otp" => "",
      ],
      "store" => ["name" => "MyApp", "website_url" => "https://myapp.com"],
      "actions" => [
        "cancel_url" => "",
        "return_url" => "",
        "callback_url" => "https://myapp.com/api/callback/ligdicash",
      ],
      "custom_data" => ["transaction_id" => "ORD-2025-00062"],
    ],
  ];

  $ch = curl_init("https://app.ligdicash.com/pay/v01/straight/checkout-invoice/create");
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Apikey: " . $_ENV["LIGDICASH_API_KEY"],
    "Authorization: Bearer " . $_ENV["LIGDICASH_API_TOKEN"],
    "Accept: application/json",
    "Content-Type: application/json",
  ]);

  $data = json_decode(curl_exec($ch), true);
  // Redirect the customer to the Orange portal
  header("Location: " . $data["response_text"]);
  ```
</CodeGroup>

## Expected response

<CodeGroup>
  ```json Success (create) theme={null}
  {
    "response_code": "00",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
    "response_text": "https://mpayment.orange-money.com/ml/mpayment/abstract/v1nd8lrkjniiezp3gus76kvmlgztvuylkcs2y5kiir6stko13emvuabrv95oaufb",
    "description": "",
    "custom_data": {
      "transaction_id": "ORD-2025-00062",
      "logfile": "202605111744086a021568f2037"
    },
    "wiki": "https://client.ligdicash.com/wiki/createInvoice"
  }
  ```

  ```json Failure (create) theme={null}
  {
    "response_code": "01",
    "token": "",
    "response_text": "Echec (Code00)",
    "wiki": "https://client.ligdicash.com/wiki/createInvoice"
  }
  ```
</CodeGroup>

<Warning>
  Store the `token` immediately after creation. Use it to call `confirm` when the callback is received — never rely on the token in the callback payload.
</Warning>

## Limits

| Parameter      | Value   |
| -------------- | ------- |
| Minimum amount | 100 XOF |
| Maximum amount | --      |
| Daily limit    | --      |

## Related pages

* [Validation modes — Operator redirect](/en/payment-api/direct-payin/validation-modes) — flow details
* [Create a transaction](/en/payment-api/direct-payin/create-transaction) — full endpoint reference
* [Verify the status](/en/payment-api/direct-payin/verify-status) — call `confirm` after the callback
