POST
/
merchants
/
webhooks
/
update
cURL
curl -X POST "https://dev.api.onekhusa.com/sandbox/v1/merchants/webhooks/update" \
  --header "Authorization: Bearer your-jwt-token" \
  --header "Content-Type: application/json" \
  --header "Accept-Language: en" \
   -d '{
    "webhookId": 1,
    "merchantAccountNumber": 35253486,
    "eventCode": "payment.success",
    "callbackUrl": "https://merchant.example.com/webhooks/payment-updated",
    "capturedBy": "johndoe@example.com"
  }'
"Merchant webhook has been updated successfully"

Authorizations

Authorization
string
header
required

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

Headers

Accept-Language
string
default:en

Preferred language for the response

Body

application/json
webhookId
integer<int64>
required

The unique identifier of the webhook to update

Example:

1

merchantAccountNumber
integer
required

The unique identifier of the merchant account

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

35253486

eventCode
string
required

The new or updated event code for the webhook (free-form string). See webhook events documentation for common codes.

Example:

"payment.success"

callbackUrl
string<uri>
required

The new or updated callback URL (must be reachable)

Example:

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

capturedBy
string<email>
required

Email address of the user updating the webhook

Example:

"admin@onekhusa.com"

Response

200 - application/json

OK - Webhook successfully updated

message
string
Example:

"Merchant webhook has been updated successfully"