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

# Resend Job Status

> Check the progress and status of a bulk payout webhook resend job

## Overview

After dispatching a bulk resend job via [Resend Payout Webhooks (Bulk)](/api-reference/cash-out/webhooks/resend-bulk),
use this endpoint to monitor its progress. Job state is available for **24 hours** after completion.

## Path Parameters

<ParamField path="jobId" type="string" required>
  The job ID returned by the [bulk resend endpoint](/api-reference/cash-out/webhooks/resend-bulk).

  Example: `"a3f1bc2e4d8f0a1b2c3d4e5f6a7b8c9d"`
</ParamField>

## Response

<ResponseField name="status" type="string">
  Current status of the job.

  | Value        | Description                                    |
  | ------------ | ---------------------------------------------- |
  | `processing` | Job is running — transactions are being queued |
  | `completed`  | Job finished successfully                      |
  | `failed`     | Job encountered a fatal error and was aborted  |
</ResponseField>

<ResponseField name="merchant_id" type="integer">
  ID of the merchant for which the resend was triggered.

  Example: `303`
</ResponseField>

<ResponseField name="start_time" type="string">
  Start of the time range used in the original request.

  Example: `"2026-03-24 08:00:00"`
</ResponseField>

<ResponseField name="end_time" type="string">
  End of the time range used in the original request.

  Example: `"2026-03-24 11:00:00"`
</ResponseField>

<ResponseField name="total" type="integer">
  Total number of payout transactions matched at the time of dispatch.

  Example: `87`
</ResponseField>

<ResponseField name="queued" type="integer">
  Number of webhook notifications successfully enqueued so far.

  Example: `60`
</ResponseField>

<ResponseField name="failed" type="integer">
  Number of webhook notifications that failed to be enqueued.

  Example: `1`
</ResponseField>

<ResponseField name="started_at" type="string">
  ISO 8601 timestamp of when the job started.

  Example: `"2026-03-24T08:05:00+00:00"`
</ResponseField>

<ResponseField name="updated_at" type="string">
  ISO 8601 timestamp of the last state update.

  Example: `"2026-03-24T08:07:32+00:00"`
</ResponseField>

<ResponseField name="reason" type="string">
  Present only when `status` is `failed`. Describes the fatal error that caused the job to abort.

  Example: `"Connection refused"`
</ResponseField>

<ResponseExample>
  ```json 200 (processing) theme={null}
  {
    "status": "processing",
    "merchant_id": 303,
    "start_time": "2026-03-24 08:00:00",
    "end_time": "2026-03-24 11:00:00",
    "total": 87,
    "queued": 60,
    "failed": 0,
    "started_at": "2026-03-24T08:05:00+00:00",
    "updated_at": "2026-03-24T08:07:32+00:00"
  }
  ```

  ```json 200 (completed) theme={null}
  {
    "status": "completed",
    "merchant_id": 303,
    "start_time": "2026-03-24 08:00:00",
    "end_time": "2026-03-24 11:00:00",
    "total": 87,
    "queued": 86,
    "failed": 1,
    "started_at": "2026-03-24T08:05:00+00:00",
    "updated_at": "2026-03-24T08:08:45+00:00"
  }
  ```

  ```json 200 (failed) theme={null}
  {
    "status": "failed",
    "merchant_id": 303,
    "start_time": "2026-03-24 08:00:00",
    "end_time": "2026-03-24 11:00:00",
    "total": 87,
    "queued": 0,
    "failed": 0,
    "started_at": "2026-03-24T08:05:00+00:00",
    "updated_at": "2026-03-24T08:05:03+00:00",
    "reason": "Connection refused"
  }
  ```

  ```json 404 theme={null}
  {
    "message": "Job not found."
  }
  ```

  ```json 403 theme={null}
  {
    "message": "Forbidden"
  }
  ```
</ResponseExample>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.wepayments.com/v2/payout/notifications/resend/a3f1bc2e4d8f0a1b2c3d4e5f6a7b8c9d" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const jobId = 'a3f1bc2e4d8f0a1b2c3d4e5f6a7b8c9d';

  const response = await fetch(
    `https://api.wepayments.com/v2/payout/notifications/resend/${jobId}`,
    {
      headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
    }
  );

  const job = await response.json();
  console.log(`Status: ${job.status} — queued: ${job.queued}/${job.total}`);
  ```

  ```python Python theme={null}
  import requests

  job_id = 'a3f1bc2e4d8f0a1b2c3d4e5f6a7b8c9d'

  response = requests.get(
      f'https://api.wepayments.com/v2/payout/notifications/resend/{job_id}',
      headers={'Authorization': 'Bearer YOUR_API_KEY'}
  )

  job = response.json()
  print(f"Status: {job['status']} — queued: {job['queued']}/{job['total']}")
  ```

  ```php PHP theme={null}
  <?php
  $jobId = 'a3f1bc2e4d8f0a1b2c3d4e5f6a7b8c9d';

  $ch = curl_init("https://api.wepayments.com/v2/payout/notifications/resend/{$jobId}");
  curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_API_KEY']);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

  $response = json_decode(curl_exec($ch), true);
  curl_close($ch);

  echo "Status: {$response['status']} — queued: {$response['queued']}/{$response['total']}";
  ?>
  ```
</CodeGroup>

## Polling the Job

Job state is updated in real-time as the job processes each chunk of 200 transactions. A simple polling pattern:

```javascript theme={null}
async function waitForJob(jobId, intervalMs = 3000) {
  while (true) {
    const res = await fetch(
      `https://api.wepayments.com/v2/payout/notifications/resend/${jobId}`,
      { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
    );
    const job = await res.json();

    console.log(`[${job.status}] queued: ${job.queued}/${job.total}, failed: ${job.failed}`);

    if (job.status === 'completed' || job.status === 'failed') {
      return job;
    }

    await new Promise(resolve => setTimeout(resolve, intervalMs));
  }
}
```

<Note>
  Job state is stored for **24 hours**. After that, the endpoint will return `404`.
</Note>

## Related

<CardGroup cols={2}>
  <Card title="Resend Webhooks (Bulk)" icon="rotate" href="/api-reference/cash-out/webhooks/resend-bulk">
    Dispatch a new bulk resend job
  </Card>

  <Card title="Payout Webhook" icon="webhook" href="/cash-out/payout-webhook">
    Understand the webhook payload structure
  </Card>
</CardGroup>
