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

# Merchant payout — to mobile money

> Transfer funds directly to a mobile money number with POST /pay/v01/straight/payout, without an intermediary LigdiCash wallet.

Merchant payout sends funds directly to a **mobile money number**, without the beneficiary needing a LigdiCash account. This is the method to use when the recipient is not registered on LigdiCash or when you want to pay to any mobile money number.

<Warning>
  This method is not instant. Processing time can range from a few seconds to several days depending on the operator. Plan for a tracking mechanism via callback and/or polling.
</Warning>

## Prerequisites

* Payout must be enabled on your API project.
* Your server IP addresses must be **whitelisted by LigdiCash** — requests from non-whitelisted IPs are rejected. Contact [developper@ligdicash.com](mailto:developper@ligdicash.com) to enable it.
* The sub-account of the operator matching the beneficiary's number must be sufficiently funded.

## Endpoint

```
POST https://app.ligdicash.com/pay/v01/straight/payout
```

## Required headers

| Header          | Value                 |
| --------------- | --------------------- |
| `Apikey`        | Your API key          |
| `Authorization` | `Bearer {AUTH_TOKEN}` |
| `Accept`        | `application/json`    |
| `Content-Type`  | `application/json`    |

## Request body

All fields are nested inside a `commande` object.

<ParamField body="commande" type="object" required>
  <Expandable title="commande fields">
    <ParamField body="amount" type="integer" required>
      Amount to transfer in XOF. Must be a positive integer (no decimals).
    </ParamField>

    <ParamField body="description" type="string" required>
      Description of the operation. Appears in the transaction history.
    </ParamField>

    <ParamField body="customer" type="string" required>
      Beneficiary's mobile money phone number, with country code, no `+` or spaces. Example: `22670000000`.
    </ParamField>

    <ParamField body="callback_url" type="string" required>
      HTTPS URL of your server that will receive the result notification. Must be publicly accessible.
    </ParamField>

    <ParamField body="custom_data" type="object">
      Custom data associated with the transaction. Recommended: include a merchant-generated unique `transaction_id` to identify the transaction in your system.
    </ParamField>
  </Expandable>
</ParamField>

## Request example

<CodeGroup>
  ```bash cURL theme={null}
  curl --location 'https://app.ligdicash.com/pay/v01/straight/payout' \
  --header 'Apikey: {API_KEY}' \
  --header 'Authorization: Bearer {AUTH_TOKEN}' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
    "commande": {
      "amount": 5000,
      "description": "Refund for order ORD-2024-001",
      "customer": "22670000000",
      "callback_url": "https://backend.mygreatshop.com/callback-payout",
      "custom_data": {
        "transaction_id": "PAYOUT-ORD-2024-001"
      }
    }
  }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.ligdicash.com/pay/v01/straight/payout', {
    method: 'POST',
    headers: {
      'Apikey': process.env.LIGDICASH_API_KEY,
      'Authorization': `Bearer ${process.env.LIGDICASH_AUTH_TOKEN}`,
      'Accept': 'application/json',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      commande: {
        amount: 5000,
        description: 'Refund for order ORD-2024-001',
        customer: '22670000000',
        callback_url: 'https://backend.mygreatshop.com/callback-payout',
        custom_data: {
          transaction_id: 'PAYOUT-ORD-2024-001',
        },
      },
    }),
  });

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

  ```php PHP theme={null}
  $response = $client->post('https://app.ligdicash.com/pay/v01/straight/payout', [
      'headers' => [
          'Apikey'        => $_ENV['LIGDICASH_API_KEY'],
          'Authorization' => 'Bearer ' . $_ENV['LIGDICASH_AUTH_TOKEN'],
          'Accept'        => 'application/json',
          'Content-Type'  => 'application/json',
      ],
      'json' => [
          'commande' => [
              'amount'       => 5000,
              'description'  => 'Refund for order ORD-2024-001',
              'customer'     => '22670000000',
              'callback_url' => 'https://backend.mygreatshop.com/callback-payout',
              'custom_data'  => [
                  'transaction_id' => 'PAYOUT-ORD-2024-001',
              ],
          ],
      ],
  ]);
  ```
</CodeGroup>

## Response

<ResponseField name="response_code" type="string">
  Request result code. `"00"` means the payout was initiated successfully. Any other value indicates an error.
</ResponseField>

<ResponseField name="token" type="string">
  JWT token identifying the payout. Store it immediately — it is required to [verify the status](/en/payment-api/payout/verify-status) if your callback does not fire.
</ResponseField>

<ResponseField name="response_text" type="string">
  Textual message associated with the response code. Can be empty.
</ResponseField>

<ResponseField name="description" type="string">
  Additional description. Can be empty.
</ResponseField>

<ResponseField name="custom_data" type="string">
  Always `""` for Merchant payout.
</ResponseField>

<ResponseField name="wiki" type="string">
  URL to the list of error codes specific to this endpoint. Consult when `response_code !== "00"`.
</ResponseField>

```json Success theme={null}
{
  "response_code": "00",
  "token": "{PAYOUT_TOKEN}",
  "response_text": "",
  "description": "",
  "custom_data": "",
  "wiki": "https://client.ligdicash.com/wiki/createStraightWithdrawal"
}
```

<Warning>
  A `response_code: "00"` means the payout was **initiated**, not finalized. The final result reaches you via the callback — which can arrive with a significant delay depending on the operator. Store the `token` so you can [verify the status](/en/payment-api/payout/verify-status) if it is not received.
</Warning>

## Differences with Customer payout

|                            | Merchant payout            | Customer payout              |
| -------------------------- | -------------------------- | ---------------------------- |
| Endpoint                   | `/pay/v01/straight/payout` | `/pay/v01/withdrawal/create` |
| LigdiCash account required | No                         | Yes                          |
| Instant                    | No                         | Yes (wallet credit)          |
| `top_up_wallet` parameter  | Absent                     | Required                     |

## Related pages

* [Customer payout](/en/payment-api/payout/to-ligdicash-wallet) — send to LigdiCash wallet with auto-transfer option
* [Verify the status of a payout](/en/payment-api/payout/verify-status)
* [The LigdiCash merchant account](/en/concepts/merchant-account) — understanding sub-accounts and per-operator balances
