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

# Debug webhooks

> Learn how to re-push or debug a webhook

## Get Delivered Events

Nomba offers a smooth method for tracking down or debugging earlier webhooks that were sent to your system.

This is useful:

* When you wish to verify whether a webhook was actually sent to your system.
* When a problem occurs and you need to go back and confirm that you have received notifications of all payment events via webhooks.
  You can access webhook delivery logs in two ways:

### From the Nomba Dashboard

This is the easiest way to debug webhooks. You can view webhook logs, inspect responses from your server, monitor delivery attempts and repush an event directly from the dashboard.

* Navigate to **Developer** → **Webhook Repush**.

<Frame caption="Webhook repush">
  <img src="https://mintcdn.com/nombainc/dHZLqglLk2ofl5Fe/images/Webhook-repush.png?fit=max&auto=format&n=dHZLqglLk2ofl5Fe&q=85&s=b9ecdbbda021cd25fa7bcc27960912aa" style={{ borderRadius: '0.5rem' }} loading="lazy" width="2876" height="1716" data-path="images/Webhook-repush.png" />
</Frame>

### Programmatically via API

You can query the event logs endpoint to retrieve webhook delivery details for automated monitoring or debugging.

By specifying parameters such as the event type or date range, you can fetch webhooks sent within a given timeframe and verify their delivery status.

To do this, send a `POST`request to this\`\`; this will return a detailed list of events that have been sent to your system.

See a sample request and response data below:

<CodeGroup>
  ```bash Request theme={null}
  curl --request POST \ 
  --url https://api.nomba.com/v1/webhooks/event-logs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'accountId: <accountid>' \
  --data '{
          "coreUserId": "6703XXXd1-158a-42XX-8f0b-XXXXXXXXX",
          "limit": 1,
          "eventType": "payment_success",
          "startDateTime": "2025-03-03",
          "endDateTime": "2025-03-12"
     }'
  ```

  ```json Response theme={null}
  {
      "code": "200",
      "description": "Webhook events fetched successfully",
      "data": {
          "list": [
              {
                  "webhookUrl": "https://hip-namsj.preme.ngrok-free.app/api/v1/nomba-hook",
                  "eventId": 257,
                  "eventType": "payment_success",
                  "hookRequestId": "ff99274c-58f7-4da4-b20f-XXXXXXXX",
                  "responsePayload": "This URL has no default content configured. <a href=\"https://webhook.site/#!/edit/7604-6372-41ee-8f89-d28b8d21944b\">Change response in Webhook.site</a>.",
                  "responseHttpStatus": 200
              },
          ],
          "pageToken": "MjEyOTY3MThzM2NyM3Q="
      }
  }
  ```
</CodeGroup>

***

#### Repush

After carefully reviewing the webhook via the event log API, you may want to do a single webhook repush or bulk repush; this will trigger a resend of the event back to your system.

To do a repush, send a `POST` request to `v1/webhooks/re-push`, copy the `hooksRequestId` of the event to repush from the event log list, and pass it as the request payload.

See a sample request and response data below:

<CodeGroup>
  ```bash Request theme={null}
  curl --request POST \ 
  --url https://api.nomba.com/v1/webhooks/re-push \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'accountId: <accountId>'\
  --data '{
      "hooksRequestId": "6703XXXd1-158a-42XX-8f0b-XXXXXXXXX"
    }'
  ```

  ```json Success response theme={null}
  {
    "code": "200",
    "description": "Webhooks message re-pushed successfully"
  }
  ```
</CodeGroup>

***

#### Bulk Repush

Trigger a bulk webhook repush by passing an array of `hooksRequestIds` selected from your delivery logs.

See a sample request and response data below:

<CodeGroup>
  ```bash Request theme={null}
  curl --request POST \ 
  --url https://api.nomba.com/v1/webhooks/bulk-re-push \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'accountId: <accountId>' \
  --data '{
      "hooksRequestIds": [
        "6703XXXd1-158a-42XX-8f0b-XXXXXXXXX",
        "703XXXd1-158a-42XX-8f0b-XXXXXXXXX",
        "8703XXXd1-158a-42XX-8f0b-XXXXXXXXX"
      ]
    }'
  ```

  ```json Success response theme={null}
  {
      "code": "200",
      "description": "Webhook events bulk re-pushed successfully"
  }
  ```
</CodeGroup>

***

#### Webhook Events

You can also query all events that were sent to your system.

See a sample request and response data below:

<CodeGroup>
  ```bash Request theme={null}
  curl --request POST \ 
  --url https://api.nomba.com/v1/webhooks/events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'accountId: <accountId>'\
  --data '{
      "coreUserId": "6703XXXd1-158a-42XX-8f0b-XXXXXXXXX",
      "limit": 20
    }'
  ```

  ```json Success theme={null}
  {
      "code": "200",
      "description": "Webhook events fetched successfully",
      "data": {
          "list": [
              {
                  "webHookId": 782,
                  "eventURL": "https://hip-guinea-supr.net",
                  "description": "new",
                  "eventType": "order_success",
                  "enabled": true
              },
              {
                  "webHookId": 257,
                  "eventURL": "https://hip-guinea-supr.net",
                  "description": "new",
                  "eventType": "payment_success",
                  "enabled": true
              }
          ],
          "pageToken": ""
      }

      
  }
  ```
</CodeGroup>

***

#### Webhook Replay

Webhook replay allows you to **re-trigger previous webhook events** that were not successfully delivered or whose delivery outcome is uncertain within a timeframe.

**Replay Eligibility**

Only certain webhook log statuses are safe to replay.

| Status         | Replay Allowed            | Meaning                                                                                                                                 |
| -------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `INITIATED`    | ✅ Yes (safe)              | Webhook was logged to be delivered but delivery never completed                                                                         |
| `FAILED`       | ✅ Yes (safe)              | Delivery attempt failed. We did not get a 2xx response status from your server, we got a 5xx or 4xx when we previously pushed the event |
| `INCONCLUSIVE` | ⚠️ Yes (with caution)     | Delivery outcome is unknown; we didn't hear from your server when we previously pushed                                                  |
| `PUSHED`       | ‼️ Yes (only when needed) | Delivery outcome was successful. Only use when needed                                                                                   |

You can choose from any of the event types below:

`PAYMENT_SUCCESS`, `PAYMENT_FAILED`, `PAYOUT_SUCCESS`, `PAYOUT_FAILED`, `ORDER_SUCCESS`, `PAYMENT_REVERSAL`, and `PAYOUT_REFUND`.

<Note>
  We strongly recommend implementing **idempotency handling** on your webhook endpoint to prevent duplicate processing, especially when replaying `INCONCLUSIVE` and `PUSHED` events.
</Note>

Sample request

<CodeGroup>
  ```bash Request theme={null}
  curl --request POST \ 
  --url https://api.nomba.com/v1/webhooks/replay \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'accountId: <accountId>'\
  --data '{
      "startDate": "2026-01-27T00:00:00Z",
      "endDate": "2026-01-28T23:59:59Z",
      "filter": {
          "statuses": ["INITIATED", "FAILED", "INCONCLUSIVE"],
          "eventTypes": ["PAYMENT_SUCCESS", "PAYMENT_FAILED", "PAYOUT_SUCCESS", "PAYOUT_FAILED", "ORDER_SUCCESS"]
      }
  }'
  ```

  ```json Success theme={null}
  {
      "code": "200",
      "description": "Webhook messages re-played successfully"
  }
  ```

  ***
</CodeGroup>
