GET
/
merchants
/
webhooks
/
getAll
cURL
curl -X GET "https://api.onekhusa.com/sandbox/v1/merchants/webhooks/getAll?MerchantAccountNumber=35253486" \
  --header "Authorization: Bearer your-jwt-token" \
  --header "X-Organisation-Id: FYH0NTVW0DXK" \
  --header "X-Merchant-Account-Number: 35253486" \
  --header "Accept-Language: en"
[
  {
    "merchantAccountNumber": 35253486,
    "webhookId": 1,
    "eventCode": "payment.success",
    "eventName": "Payment Success Notification",
    "callbackUrl": "https://merchant.example.com/webhooks/payment",
    "dateCreated": "2024-01-15T10:30:00Z",
    "createdBy": "PBANDA",
    "dateModified": "2024-01-16T14:20:00Z",
    "modifiedBy": "PBANDA"
  },
  {
    "merchantAccountNumber": 35253486,
    "webhookId": 2,
    "eventCode": "payout.success",
    "eventName": "Successful Disbursement (Payout)",
    "callbackUrl": "https://merchant.example.com/webhooks/payout",
    "dateCreated": "2024-01-20T09:15:00Z",
    "createdBy": "PBANDA",
    "dateModified": null,
    "modifiedBy": null
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <Token>, where <Token> is your access token.

Headers

X-Organisation-Id
string
required

The organization identifier

X-Merchant-Account-Number
string
required

The merchant account number

Accept-Language
string
default:en

Preferred language for the response

Query Parameters

MerchantAccountNumber
integer
required

The unique identifier of the merchant account

Required range: 10000000 <= x <= 99999999
Example:

35253486

Response

Success Response (200)

merchantAccountNumber
integer

The unique identifier of the merchant account

Example:

35253486

webhookId
integer

The unique identifier of the webhook

Example:

1

eventCode
string

The event code that triggers the webhook (free-form string)

Example:

"payment.success"

eventName
string

A description of the event

Example:

"Payment Success Notification"

callbackUrl
string<uri>

The URL that receives webhook notifications

Example:

"https://merchant.example.com/webhooks/payment"

dateCreated
string<date-time>

The date and time when the webhook was created (ISO 8601)

Example:

"2024-01-15T10:30:00Z"

createdBy
string

The username or identifier of the user who created the webhook

Example:

"PBANDA"

dateModified
string<date-time> | null

The date and time when the webhook was last modified (ISO 8601)

Example:

"2024-01-16T14:20:00Z"

modifiedBy
string | null

The username or identifier of the user who last modified the webhook

Example:

"PBANDA"