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

# Zamani — Niger

> Integrate Zamani Telecom Niger (Zamani Money) with the LigdiCash API. Validation mode: Guided USSD.

## Identity

| Field           | Value                                            |
| --------------- | ------------------------------------------------ |
| Country         | Niger                                            |
| Operator        | Zamani Niger (Zamani Money)                      |
| `operator_id`   | `28`                                             |
| `operator_name` | `ORANGE/ZAMANI NIGER`                            |
| Country code    | +227                                             |
| Number format   | `22790XXXXXXX` (no `+` or spaces)                |
| Endpoint        | `POST /pay/v01/straight/checkout-invoice/create` |
| Validation mode | Guided USSD                                      |

## Validation mode: Guided USSD

After your request, Zamani sends an SMS to the customer with the payment amount and the USSD code to dial to approve. The customer dials this code on their phone — they reach a USSD menu asking them to confirm with their Zamani Money PIN. No extra input on the merchant side: the callback remains the source of truth.

**Example SMS received by the customer:**

```text theme={null}
Vous allez faire un retrait de 103.00 FCFA. Veuillez entrer le #146# et suivre les instructions
```

<Note>
  The SMS arrives within seconds, but the customer may take several minutes to read it and dial the USSD. Keep the waiting state until the callback arrives.
</Note>

## Recommended UX

<Steps>
  <Step title="Collect the customer's number">
    Your form only collects the Zamani phone number. No OTP to collect at this stage.
  </Step>

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

  <Step title="Show a waiting message">
    After submission, display:

    > *"You will receive an SMS on your phone with the instructions to validate the payment. Dial the USSD code shown and confirm with your Zamani Money PIN."*

    Keep the waiting state until the callback arrives.
  </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": "22790000001",
          "customer_firstname": "Mariama",
          "customer_lastname": "Soumana",
          "customer_email": "mariama@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-00064"
        }
      }
    }'
  ```

  ```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: "22790000001",
            customer_firstname: "Mariama",
            customer_lastname: "Soumana",
            customer_email: "mariama@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-00064" },
        },
      }),
    }
  );

  const data = await response.json();
  ```

  ```php PHP theme={null}
  $payload = [
    "commande" => [
      "invoice" => [
        "items" => [],
        "total_amount" => 5000,
        "devise" => "XOF",
        "description" => "Pro Subscription — January 2025",
        "customer" => "22790000001",
        "customer_firstname" => "Mariama",
        "customer_lastname" => "Soumana",
        "customer_email" => "mariama@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-00064"],
    ],
  ];

  $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);
  curl_close($ch);
  ```
</CodeGroup>

## Expected response

<CodeGroup>
  ```json Success (create) theme={null}
  {
    "response_code": "00",
    "token": "eyJ0eXAiOiJKV1Qi...",
    "response_text": "Votre requête est en cours de traitement",
    "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 | 10 XOF |
| Maximum amount | --     |
| Daily limit    | --     |

## Related pages

* [Validation modes — Guided USSD](/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
