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

# Create a wallet payout

> Transfers funds to a beneficiary's LigdiCash wallet, with an option to auto-transfer to their mobile money.

<Note>
  The beneficiary must have a LigdiCash account. To send directly to a mobile money number without a LigdiCash account, use [POST /pay/v01/straight/payout](/en/reference/endpoints/straight-payout).
</Note>

## Headers

<ParamField header="Apikey" type="string" required>
  API key of the LigdiCash project.
</ParamField>

<ParamField header="Authorization" type="string" required>
  `Bearer {API_TOKEN}`
</ParamField>

<ParamField header="Accept" type="string" required>
  `application/json`
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `application/json`
</ParamField>

## Body

<ParamField body="commande" type="object" required>
  <Expandable title="commande" defaultOpen>
    <ParamField body="amount" type="integer" required>Amount in XOF (positive integer).</ParamField>
    <ParamField body="description" type="string" required>Operation description.</ParamField>
    <ParamField body="customer" type="string" required>Beneficiary's phone number. Format: country code + number, no `+` or spaces. Example: `22670000000`.</ParamField>
    <ParamField body="callback_url" type="string" required>HTTPS notification URL. Must be publicly accessible.</ParamField>

    <ParamField body="top_up_wallet" type="integer" required>
      * `1` — funds stay in the beneficiary's LigdiCash wallet.
      * `0` — LigdiCash automatically triggers a transfer to the linked mobile money account.
    </ParamField>

    <ParamField body="custom_data" type="object">Free-form metadata. Recommended: include a unique `transaction_id`.</ParamField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="response_code" type="string">`"00"` = payout initiated, any other value = error.</ResponseField>
<ResponseField name="token" type="string">Payout token. Store it — required to [verify the status](/en/reference/endpoints/withdrawal-confirm).</ResponseField>
<ResponseField name="response_text" type="string">Associated message. Can be empty.</ResponseField>
<ResponseField name="description" type="string">Additional description. Can be empty.</ResponseField>
<ResponseField name="custom_data" type="array">Always `[]`.</ResponseField>
<ResponseField name="wiki" type="string">URL to the sub-codes documentation.</ResponseField>

<CodeGroup>
  ```json Success theme={null}
  {
    "response_code": "00",
    "token": "{PAYOUT_TOKEN}",
    "response_text": "",
    "description": "",
    "custom_data": [],
    "wiki": "https://client.ligdicash.com/wiki/createWithdrawal"
  }
  ```

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

## Error codes

Wiki: `https://client.ligdicash.com/wiki/createWithdrawal` — see [Sub-codes per endpoint](/en/errors/sub-codes#createwithdrawal).

## Related guide

[Customer payout — to LigdiCash wallet](/en/payment-api/payout/to-ligdicash-wallet) — use cases and `top_up_wallet` details.
