curl --location 'https://api.nomba.com/v1/webhooks/events' \
--header 'Authorization: Bearer TOKEN \
--header 'Content-Type: application/json' \
--header 'accountId: 670353d1-158a-XXXXXXXXX'\
--data '{
    "coreUserId": "6703XXXd1-158a-42XX-8f0b-XXXXXXXXX",
    "limit": 20
  }'
{
    "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": ""
    }
}

When a business or user subscribes to an event type on the dashboard, they can use this endpoint to fetch the webhook event types that they subscribe to.

POST /v1/webhooks/events

Request Body

coreUserId
string
required

The unique identifier of the user or business whose webhook events are to be retrieved.

limit
integer

The number of records to return. Default is 20.

Response Body

code
string
required

Response code indicating the status of the request.

description
string
required

Description of the response.

data
object
list
array

A list of webhook event types and their configurations.

webHookId
integer
required

Unique identifier of the webhook configuration.

eventURL
string
required

The URL configured to receive the webhook event.

description
string

Optional description for the webhook.

eventType
string
required

Type of webhook event (e.g., payment_success).

enabled
boolean
required

Indicates whether this webhook is active.

pageToken
string

Token for paginating additional results, if any.

curl --location 'https://api.nomba.com/v1/webhooks/events' \
--header 'Authorization: Bearer TOKEN \
--header 'Content-Type: application/json' \
--header 'accountId: 670353d1-158a-XXXXXXXXX'\
--data '{
    "coreUserId": "6703XXXd1-158a-42XX-8f0b-XXXXXXXXX",
    "limit": 20
  }'
{
    "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": ""
    }
}