Skip to main content
When a webhook delivery fails — because your server was down, returned a non-2xx status, or timed out — Shogun records the attempt in the delivery log. Use this endpoint to query those logs, inspect the raw payload Shogun sent, see the HTTP response your server returned, and identify how many times delivery was retried. This is your primary tool for diagnosing missed events and auditing what your integration received.

Endpoint

POST https://baasapi.payrepmfb.com/api/v1/customer/api/fetch_webhook_logs
Authentication: Authorization: Bearer <token> — obtain a token from Generate Token.

Request parameters

filters
object
required
An object of filter fields to narrow the log results. Pass an empty object ({}) to fetch all logs.

Example requests

Fetch all recent logs:
curl -X POST https://baasapi.payrepmfb.com/api/v1/customer/api/fetch_webhook_logs \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "filters": {}
  }'
Fetch only failed deliveries:
curl -X POST https://baasapi.payrepmfb.com/api/v1/customer/api/fetch_webhook_logs \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "filters": {
      "status": "failed"
    }
  }'
Look up logs for a specific event type:
curl -X POST https://baasapi.payrepmfb.com/api/v1/customer/api/fetch_webhook_logs \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "filters": {
      "event": "COLLECTION_SUCCESS"
    }
  }'

Response

200 OK

status
boolean
true on success.
response_code
string
"00" on success.
message
string
Human-readable result message.
data
array of objects
An array of webhook log entries, newest first.
{
  "status": true,
  "response_code": "00",
  "message": "Webhook logs fetched successfully",
  "data": [
    {
      "id": "f9e8d7c6-b5a4-3210-fedc-ba9876543210",
      "event": "COLLECTION_SUCCESS",
      "status": "delivered",
      "attempt": 1,
      "payload": {
        "event": "COLLECTION_SUCCESS",
        "data": {
          "account_number": "9901234567",
          "amount": "5000.00",
          "reference": "TXN-20260428-001"
        }
      },
      "response_body": "",
      "response_status_code": 200,
      "created_at": "2026-04-28T10:15:00Z"
    },
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-000000000001",
      "event": "TRANSFER_FAILED",
      "status": "failed",
      "attempt": 3,
      "payload": {
        "event": "TRANSFER_FAILED",
        "data": {
          "reference": "TXN-20260427-099",
          "reason": "Beneficiary account not found"
        }
      },
      "response_body": "Service Unavailable",
      "response_status_code": 503,
      "created_at": "2026-04-27T22:45:00Z"
    }
  ]
}
When you find a "failed" log entry, copy its payload field and POST it directly to your webhook handler for local testing. This lets you replay any missed event without waiting for another transaction to occur.