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

# Verify the status of a payout

> Query GET /pay/v01/withdrawal/confirm to know the result of a payout after creation.

After initiating a payout, LigdiCash notifies you of the result via your `callback_url`. If the callback does not fire — network unavailable, server restarted, delay too long — you can query this endpoint directly with the `token` returned at creation.

<Note>
  The callback remains the primary method. This endpoint is a **safety net**, not a substitute for the callback. Do not use it in a tight loop: prefer spaced polling (every 30 to 60 seconds) with a maximum number of attempts.
</Note>

## Endpoint

```
GET https://app.ligdicash.com/pay/v01/withdrawal/confirm/
```

## Parameters

| Parameter         | Type         | Description                                           |
| ----------------- | ------------ | ----------------------------------------------------- |
| `withdrawalToken` | query string | The `token` returned by the payout creation endpoint. |

## Required headers

| Header          | Value                 |
| --------------- | --------------------- |
| `Apikey`        | Your API key          |
| `Authorization` | `Bearer {AUTH_TOKEN}` |

## Request example

<CodeGroup>
  ```bash cURL theme={null}
  curl --location 'https://app.ligdicash.com/pay/v01/withdrawal/confirm/?withdrawalToken={PAYOUT_TOKEN}' \
  --header 'Apikey: {API_KEY}' \
  --header 'Authorization: Bearer {AUTH_TOKEN}'
  ```

  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({ withdrawalToken: payoutToken });

  const response = await fetch(
    `https://app.ligdicash.com/pay/v01/withdrawal/confirm/?${params}`,
    {
      headers: {
        'Apikey': process.env.LIGDICASH_API_KEY,
        'Authorization': `Bearer ${process.env.LIGDICASH_AUTH_TOKEN}`,
      },
    }
  );

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

  ```php PHP theme={null}
  $params = http_build_query(['withdrawalToken' => $payoutToken]);

  $response = $client->get(
      "https://app.ligdicash.com/pay/v01/withdrawal/confirm/?{$params}",
      [
          'headers' => [
              'Apikey'        => $_ENV['LIGDICASH_API_KEY'],
              'Authorization' => 'Bearer ' . $_ENV['LIGDICASH_AUTH_TOKEN'],
          ],
      ]
  );
  ```
</CodeGroup>

## Response

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

<ResponseField name="token" type="string">
  JWT token of the payout — identical to the one used as a parameter.
</ResponseField>

<ResponseField name="response_text" type="string">
  Label of the result code from the LigdiCash wiki. Can be empty.
</ResponseField>

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

<ResponseField name="custom_data" type="array">
  Always `[]` on this endpoint.
</ResponseField>

<ResponseField name="wiki" type="string">
  URL to the list of error codes specific to this endpoint.
</ResponseField>

<ResponseField name="status" type="string">
  Payout transaction status: `"completed"`, `"pending"`, or `"notcompleted"`. See [Response codes and statuses](/en/concepts/response-codes-and-statuses).
</ResponseField>

<ResponseField name="operator_id" type="string">
  Identifier of the operator that processed the payout (e.g. `"11"` for Orange Burkina).
</ResponseField>

<ResponseField name="operator_name" type="string">
  Operator name (e.g. `"ORANGE BURKINA"`).
</ResponseField>

```json Success theme={null}
{
  "response_code": "00",
  "token": "{PAYOUT_TOKEN}",
  "response_text": "",
  "description": "",
  "custom_data": [],
  "wiki": "https://client.ligdicash.com/wiki/createStraightWithdrawal",
  "status": "completed",
  "operator_id": "11",
  "operator_name": "ORANGE BURKINA"
}
```

## Interpreting the status

Base your business logic on the `status` field.

| `status`       | Meaning                       | Recommended action                                           |
| -------------- | ----------------------------- | ------------------------------------------------------------ |
| `completed`    | Payout finalized successfully | Update your database, notify the beneficiary                 |
| `pending`      | Processing in progress        | Wait for the callback; if absent, repoll in 30 to 60 seconds |
| `notcompleted` | Payout failed                 | Consult `wiki` for details, notify the requester             |

## Related pages

* [Customer payout](/en/payment-api/payout/to-ligdicash-wallet) — create a payout to LigdiCash wallet
* [Merchant payout](/en/payment-api/payout/to-mobile-money) — create a payout to mobile money
* [Response codes and statuses](/en/concepts/response-codes-and-statuses)
