GET
/
merchants
/
webhooks
/
get
cURL
curl -X POST "https://api.onekhusa.com/sandbox/v1/merchants/webhooks/get" \
  --header "Authorization: Bearer your-jwt-token" \
  --header "Content-Type: application/json" \
  --header "X-Organisation-Id: FYH0NTVW0DXK" \
  --header "X-Merchant-Account-Number: 35253486" \
  --header "Accept-Language: en" \
  -d '{
    "merchantAccountNumber": 35253486,
    "eventCode": "payment.success"
  }'
{
  "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"
}

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

Body

application/json
merchantAccountNumber
integer
required

The unique identifier of the merchant account

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

35253486

eventCode
string
required

The event code of the webhook subscription to retrieve

Example:

"payment.success"

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

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"